The features all work fine, but somehow the display of the textbuttons gets stuck weirdly. It switches around after I click on one, and only seem to appear when the setting is on Jump. It doesn't prevent the buttons from working, but it's an annoying glitch which I have no idea why it happens.
This is the code of the screen itself.
Code: Select all
screen chapters:
tag menu
add "black"
vbox:
style_prefix "radio"
xalign 0.02
yalign 0.01
label _("Read Mode")
textbutton _("Replay") action SetVariable('read_mode', False)
textbutton _("Jump") action SetVariable('read_mode', True)
hbox:
style_prefix "radio"
xalign 0.5
yalign 0.03
spacing 30
textbutton _("Act 1") action SetVariable('route_mode', 0)
if persistent.read_chapters['C1'] > 0:
textbutton _("Act 2") action SetVariable('route_mode', 1)
if persistent.read_chapters['P1'] > 0:
textbutton _("Act 3") action SetVariable('route_mode', 2)
if persistent.read_chapters['S1'] > 0:
textbutton _("Act 4") action SetVariable('route_mode', 3)
if persistent.read_chapters['A1'] > 0:
if route_mode == 0:
if read_mode:
textbutton "Gone" xpos 0.15 ypos 0.15 action [SetVariable('read_current', 0),Start("game")]
else:
textbutton "Gone" xpos 0.15 ypos 0.15 action Replay("A1")
elif route_mode == 1:
if read_mode:
textbutton "Found" xpos 0.15 ypos 0.15 action Start("game")
else:
textbutton "Found" xpos 0.15 ypos 0.15 action Replay("A1")
# elif:
if persistent.read_chapters['X1'] > 0:
if route_mode == 0:
if read_mode:
textbutton "Opening" xpos 0.15 ypos 0.19 action [SetVariable('read_current', 1),Start("game")]
else:
textbutton "Opening" xpos 0.15 ypos 0.19 action Replay("X1")
if persistent.read_chapters['A2'] > 0:
if route_mode == 0:
if read_mode:
textbutton "Hello" xpos 0.15 ypos 0.23 action [SetVariable('read_current', 2),Start("game")]
else:
textbutton "Hello" xpos 0.15 ypos 0.23 action Replay("A2")
if persistent.read_chapters['A3'] > 0:
if route_mode == 0:
if read_mode:
textbutton "It" xpos 0.15 ypos 0.27 action [SetVariable('read_current', 3),Start("game")]
else:
textbutton "It" xpos 0.15 ypos 0.27 action Replay("A3")
if persistent.read_chapters['A3A1'] > 0:
if route_mode == 0:
if read_mode:
textbutton "No" xpos 0.15 ypos 0.31 action [SetVariable('read_current', 4),SetDict(Alexandria, 'A3', 1),Start("game")]
else:
textbutton "No" xpos 0.15 ypos 0.31 action Replay("A3A1")
if persistent.read_chapters['A3B1'] > 0:
if route_mode == 0:
if read_mode:
textbutton "Lost" xpos 0.15 ypos 0.35 action [SetVariable('read_current', 4),SetDict(Alexandria, 'A3', 2),Start("game")]
else:
textbutton "Lost" xpos 0.15 ypos 0.35 action Replay("A3B1")
if persistent.read_chapters['A4'] > 0:
if route_mode == 0:
if read_mode:
textbutton "Fine" xpos 0.15 ypos 0.39 action [SetVariable('read_current', 5),Start("game")]
else:
textbutton "Fine" xpos 0.15 ypos 0.39 action Replay("A4")
textbutton "Return" xalign 0.5 yalign 0.98 action Return()
textbutton "Reset" xalign 0.98 yalign 0.98 action Jump("total_reset")