Since there are other options I want to add to this screen I thought it'd be nice if the input could be stuck inside a button like the save/load page names in the tutorial game, which are uneditable by default but can be toggled between editable and uneditable when clicked on.
What is actually happening is that the input is always editable. When clicked on it's styled as if selected but as soon as I hit a key it becomes unselected again, and it's editable regardless of if I've clicked it.
Here's the current screen:
Code: Select all
screen newgame():
default playername = FieldInputValue(persistent, 'playername')
button:
key_events True
xalign 0.5
yoffset 200
action playername.Toggle()
input value playername style 'button_text' size 48
I also have tried adding default=False as an argument for FieldInputValue but then it's always uneditable, which is even worse. I can click to make it styled as if selected but it can't ever be edited.
Any ideas what I'm doing wrong?