Most of the examples are for use inside the 'label'. But I need inside 'screen'.
Code: Select all
screen:
some button ... action Show('get_name')
screen get_name:
$ name = renpy.input ...Code: Select all
screen:
some button ... action Show('get_name')
screen get_name:
$ name = renpy.input ...I want to call a separate 'screen' with an 'input' from another 'screen' via a button.Ocelot wrote: ↑Fri Oct 14, 2022 5:18 pmI am not sure what exactly do you want.
If you want an input field within screen, there is an input screen statement and multitude of InputValues to update different kinds of variables.
If you need something else, tell exactly what do you want.
Code: Select all
input default "Joseph P. Blow, ESQ."Code: Select all
init:
$ name = ''
screen some_1:
textbutton 'change name' action Show('change_name')
screen change_name:
$ name = input()Code: Select all
default character_name = "John Doe"
screen name_input():
modal True
frame:
align (0.5, 0.5)
padding (25, 25)
input value VariableInputValue("character_name", returnable=True)
screen some_screen():
textbutton "Change Name" action [SetVariable("character_name", ""), ShowTransient("name_input")]
label start:
"At this moment your name is [character_name]"
show screen some_screen
"Try to change it now. Proceed when you do."
"At this moment your name is [character_name]"
return
Oh, my God! I love you. You saved me. I've seen a lot of different examples, but never the one you gave me. Thank you so much!Ocelot wrote: ↑Fri Oct 14, 2022 6:24 pmAn example of barebones input screen:In addition, a working example of input screen, the one which is used by renpy.input by default if no other screen is specified when called, is input screen and it is in screens.rpy of every new project.Code: Select all
default character_name = "John Doe" screen name_input(): modal True frame: align (0.5, 0.5) padding (25, 25) input value VariableInputValue("character_name", returnable=True) screen some_screen(): textbutton "Change Name" action [SetVariable("character_name", ""), ShowTransient("name_input")] label start: "At this moment your name is [character_name]" show screen some_screen "Try to change it now. Proceed when you do." "At this moment your name is [character_name]" return
Users browsing this forum: Google [Bot], Majestic-12 [Bot]