Files
faust-vn/vn/game/menus.rpy
T

69 lines
1.7 KiB
Plaintext

## Scene select and credits screens, reached from the main menu. The data they show
## (`vn_scenes`, `vn_credits`) is generated in menu_data.rpy; static otherwise.
## Labels of the scenes the player has reached; updated when a scene starts.
default persistent.vn_seen_scenes = set()
init python:
def vn_mark_scene(label):
if label not in persistent.vn_seen_scenes:
persistent.vn_seen_scenes.add(label)
renpy.save_persistent()
screen vn_scene_select():
tag menu
use game_menu("Escenas", scroll="viewport"):
style_prefix "vn_scenes"
vbox:
spacing 6
for scene_label, scene_title in vn_scenes:
if scene_label in persistent.vn_seen_scenes:
textbutton scene_title action Start(scene_label)
else:
textbutton "—" action NullAction() sensitive False
style vn_scenes_button is gui_button
style vn_scenes_button_text is gui_button_text
style vn_scenes_button:
properties gui.button_properties("navigation_button")
xalign 0.0
style vn_scenes_button_text:
properties gui.text_properties("navigation_button")
xalign 0.0
size 30
screen vn_credits():
tag menu
use game_menu("Créditos", scroll="viewport"):
style_prefix "vn_credits"
vbox:
spacing 6
for section_title, entries in vn_credits:
null height 20
label section_title
for entry in entries:
text entry
style vn_credits_label is gui_label
style vn_credits_label_text is gui_label_text
style vn_credits_text is gui_text
style vn_credits_label_text:
size gui.label_text_size
style vn_credits_text:
size 26
xmaximum 1100