Near the beginning of a game I'm working on, I have a screen for the player to select their anatomy, how they'll be referred to, and to name both the protagonist and the inn they run. Screenshot attached, please ignore the shitty assets and UI design; they are obviously not final.
After a bit of googling and borrowing code, I figured out how to let the player input the text in the actual windows up at the top, rather than using textbuttons that open text input in the dialogue screen. I've attached the code for these two input boxes below:
Code: Select all
screen innkeepercustomization:
frame:
xpos 150 ypos 50
xminimum 350
xmaximum 350
has vbox
vbox:
label _("Innkeeper Name:")
input default "Innkeeper"
frame:
xpos 650 ypos 50
xminimum 350
xmaximum 350
has vbox
vbox:
label _("Inn Name:")
input default "The Aftercare Inn"
- The player needs to be able to click on these two text fields to select them and type; right now, only the inn name is selected and there's no way to select the innkeeper's name and enter it.
- I need whatever is entered to be bound to variables, so I can reflect the chosen names in the text of the game.
- I need to limit the length of the entered names to ensure they don't extend beyond the vbox boundaries.
- EDIT: Just realized I'd want the text for the custom honorifics to be presented the same way; can I have a text input option in that radio menu on the bottom left?
The first is just a new problem I don't have any idea how to deal with, and the other two are things I knew how to do back when these were just textbuttons that opened an input window, but can't figure out now that I have the text in their own frames. Any help making this work would be appreciated!!


