The code below is little more than a call screen with a single button intended to update a list item, however when coming from the Example dialogue line, the button ignores the first click. At first I thought I'd missed a restart_interaction but the Function action takes care of that automatically (and adding an explicit one doesn't alter the behaviour). The weird part is that reloading the game (Shift+R) while on the screen means it only needs one click, it's only when the player moves from the dialogue line to the screen that this occurs.
Code: Select all
label start:
scene black
'Example'
call screen test()
'Return Value: [_return!r]'
return
screen test():
default seq = [None]
vbox:
align .5, .5
spacing 10
text 'Why does the button below require two clicks?'
text 'Value: {{color=f999}}{!r}{{/color}}'.format(seq) align .5, .5
null
imagebutton:
align .5, .5
xysize (100, 100)
idle Solid('ff9')
hover Solid('fc9')
action Function(seq.__setitem__, 0, True)
textbutton 'Exit screen' action Return(seq) align .5, .5