- Oct 20, 2021
- 248
- 642
Friends, got stumped with my task, can you help?
I'm making a table of contents for a VN, like in a book. The reader can jump to any chapter or page of the book through the table of contents.
What I've done:
1/ with the Script file, I create a numbered label for each page.
In the quick menu, I created an item called "Pages":
In the screen "pages", I created buttons to jump to labels:
I was happy it was working until I saw that:
1/ the Quick menu disappeared
2/ The splitting text stopped working, now it fills the entire available height.
This continues until I reach the Return command at the end of the script. Probably Jump is doing the transition in the Pages window and not in the window: screen nvl(dialogue, items=None): ...
Can you give me a direction for finding information on how to fix the table of contents of a book. I have not found a ready example of a table of contents.
I'm making a table of contents for a VN, like in a book. The reader can jump to any chapter or page of the book through the table of contents.
What I've done:
1/ with the Script file, I create a numbered label for each page.
Python:
label start:
# Page1
label сhapter_1:
scene image_1
author "text here{nw}"
pers "text here"
nvl clear
# Page2
label сhapter_2:
scene image_2
author "text here{nw}"
pers "text here"
nvl clear
return
Python:
screen quick_menu():
zorder 100
if quick_menu:
hbox:
style_prefix "quick"
textbutton _("Pages") action ShowMenu("pages")
# ets
Python:
screen pages():
use game_menu(_("Pages"), scroll="viewport"):
vbox:
textbutton "Chapter 1" action Jump("сhapter_1")
textbutton "Chapter 2" action Jump("сhapter_2")
#etc

I was happy it was working until I saw that:
1/ the Quick menu disappeared
2/ The splitting text stopped working, now it fills the entire available height.

This continues until I reach the Return command at the end of the script. Probably Jump is doing the transition in the Pages window and not in the window: screen nvl(dialogue, items=None): ...
Can you give me a direction for finding information on how to fix the table of contents of a book. I have not found a ready example of a table of contents.