Code: Select all
init:
$ vari= False
$ vari2= True
style button:
background "#006"
insensitive_background "#444"
hover_background "#00a"
selected_background "#fff"
style button_text:
color "#fff"
hover_color "#0f0"
selected_color "#F00"
screen button:
vbox:
text"by default vari=False vari2=True"
textbutton "Vari=False":
action SetVariable("vari", False)
style "button"
textbutton "vari=True":
action SetVariable("vari", True)
style "button"
textbutton "vari2=True":
action SetVariable("vari2", True)
style "button"
textbutton "vari2=False":
action SetVariable("vari2", False)
style "button"
textbutton "Exit":
action Return()
text "Current status:vari=[vari],vari2=[vari2]"
screen button2:
vbox:
text"by default vari=False vari2=True"
textbutton "vari=False,vari2=False":
action [SetVariable("vari", False), SetVariable("vari2", False)]
style "button"
textbutton "vari=True,vari2=True":
action [SetVariable("vari", True), SetVariable("vari2", True)]
style "button"
textbutton "vari=True,vari2=True":
action [SetVariable("vari", True), SetVariable("vari2", True)]
style "button"
textbutton "vari=True,vari2=false":
action [SetVariable("vari", True), SetVariable("vari2", False)]
style "button"
textbutton "exit":
action Return()
text "Current status:vari=[vari],vari2=[vari2]"
label start:
scene black
call screen button
call screen button2