Now I'm playing with <input> function and stuck a bit...
I want to make a screen with button, and when player clicks this button an input screen appears, and button name will be replaced with typed text.
So, I made screen with button and made an input screen - the problem is that I don't understand how can I set the value of my variable, that represents the button name...(
I can use my input screen in regular script:
Code: Select all
$ my_button name_var = renpy.call_screen("my_input_screen")
Also, I didn't found a SL action for screen calling (only <Show> and <Hide> actions)..."Exception: ui.interact called with non-empty widget/layer stack. Did you forget a ui.close() somewhere?"
My code is:
Code: Select all
screen my_input_screen:
frame:
xalign my_x yalign my_y
xminimum 500 xmaximum 500
hbox:
text "Some text:" yalign 0.5
frame:
background Solid("#000000")
xminimum 400 xmaximum 400
hbox:
input:
length 10
default my_def size 45 color "#c00000"
screen my_buttons:
vbox:
textbutton qq action SetVariable ( "qq", str( renpy.call_screen("my_input_screen", my_x=0.2, my_y=0.7, my_def="q") ) )
textbutton "Return" action Hide("my_buttons")
# The game starts here.
label start:
"..."
$ qq = "q"
$ ww = "w"
$ some_var = renpy.call_screen("my_input_screen", my_x=0.2, my_y=0.7, my_def="q") # this works fine
"%(some_var)s"
show screen my_buttons # the button doesn't work as I want it to be
"...."
Thanks in advance...))