I've made a custom menu accessible from the main menu that shows a number of unlockable side stories and in game I am able to unlock each individual side story by doing something like this:
Code: Select all
menu:
"A scenario appears"
"Option A":
"You unlocked a Side story!"
$unlockSS(ss_1, True) #(sidestory variable name, unlock True or False)
jump tests
"Option B":
"Lame, you didn't unlock anything..."
jump tests
After I've unlocked Side story one and open the Side story menu the first time:
https://i.imgur.com/KZStlgc.png
After I open the Side story menu a second time:
https://i.imgur.com/GAc8klu.png
It's like the menu isn't refreshing right away and I'm not sure how to fix it
Here's my code for the menu:
Code: Select all
screen ss():
tag menu
add gui.main_menu_background
textbutton ("<< MAIN MENU"):
action ShowMenu("main_menu")
xpos 100
ypos 50
fixed:
vpgrid:
cols 3
yfill True
ymaximum 800
style_prefix "slot"
xalign 0.5
yalign 0.5
spacing 200
draggable True
mousewheel True
scrollbars "vertical"
yinitial 0.0
yspacing 230
for i in ssList:
button:
if i.unlocked == False:
action ShowMenu("ss")
else:
action Start(i.labelName)
has vbox
add i.thumbnail xalign 0.5 zoom 0.2
text i.title:
yoffset 15
xalign 0.5
text i.description:
xalign 0.5
ypos 30
yalign 0.0
style "slot_name_text"
#I need these text lines so the viewport doesn't cut off some of the description of the last entries
text ""
text ""
text ""