Checked wiki, searched forum, feeling blind/dumb.
And, just in case, any more not just saving/loading errors/better ways for code below?
Code: Select all
init python:
ShowLabels=False
LabelsColors=["#FFF","#FFF","#FFF"]
def toggle_labels():
global ShowLabels
ShowLabels=not ShowLabels
renpy.restart_interaction()
def colorize_label(ID):
global LabelsColors
LabelsColors[ID]=(renpy.random.randint(0,255),renpy.random.randint(0,255),renpy.random.randint(0,255),255)
renpy.restart_interaction()
Colorize=renpy.curry(colorize_label)
screen Test:
frame:
vbox:
text "Labels([ShowLabels])"
textbutton "Show/Hide" action toggle_labels
if ShowLabels:
hbox:
textbutton "C" action Colorize(0)
text "Label One" color LabelsColors[0]
hbox:
textbutton "C" action Colorize(1)
text "Label Two" color LabelsColors[1]
hbox:
textbutton "C" action Colorize(2)
text "Label Three" color LabelsColors[2]
textbutton "Done" action Return("OK")
label start:
"Started"
call screen Test
"Done [_return]"
return