This is the code in script.rpy
Code: Select all
$ player_name = renpy.input("What's your first name?")
$ player_name = player_name.strip()
if player_name == "":
$ player_name="Main character"
Code: Select all
init -2 python:
class GetText(Action):
def __init__(self,screen_name,input_id):
self.screen_name=screen_name
self.input_id=input_id
def __call__(self):
if renpy.get_widget(self.screen_name,self.input_id):
return str(renpy.get_widget(self.screen_name,self.input_id).content)
Code: Select all
screen input(prompt):
frame:
background Null()
xpos 21
ypos 19
xysize (1334, 731)
vbox:
xalign 0.5
yalign 0.5
spacing 15
frame:
style "frame_gui1"
xminimum 500
xmaximum 500
text prompt at center
frame:
style "frame_gui1"
xminimum 500
xmaximum 500
input id "input" at center
imagebutton auto "ok %s" xpos 0.40 focus_mask True action GetText("input","input")
What I want is to get multiple inputs in the same page. I feel like it will make the user feel like they are wasting time typing a lot of things. And also it can help if we need a lot of inputs for several characters.
Below is the result I want(This is a photoshoped pic):
Thank you in advance!