Renpy.input for Phones

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
ZestyTS
Newbie
Posts: 2
Joined: Wed Jan 04, 2017 1:12 am
Github: ZestyTS
Contact:

Renpy.input for Phones

#1 Post by ZestyTS »

I have looked all over and I can't seem to find any solution for this. So in my game, I ask for the user's name using
renpy.input("name: ")
but on Android phones, the keyboard pops up and covers over the textbox so the user is unable to see what they are being asked or what they are typing. I've been trying to move the input box to the middle, but I haven't been able to get that to work. I'm currently using the latest version of renpy. If you have any insight or concerns please let me know, thanks.

User avatar
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: Renpy.input for Phones

#2 Post by Karl_C »

Apparently, the android build of the game "SF-IO" uses renpy.input in combination with the android keyboard.

SF-IO is released under the GPLv2, the sources are available here on github.

I'm afraid, you will have to check the source code of SF-IO to find out how the developer handled the matter. I hope this will help you...

ZestyTS
Newbie
Posts: 2
Joined: Wed Jan 04, 2017 1:12 am
Github: ZestyTS
Contact:

Re: Renpy.input for Phones

#3 Post by ZestyTS »

Hey that's at least a starting point. Thanks so much for the reply! I've been stuck on this for a while now.

James_Bytes
Newbie
Posts: 3
Joined: Thu Jan 14, 2021 1:54 am
Contact:

Re: Renpy.input for Phones

#4 Post by James_Bytes »

The relevant code from "SF-IO" is this line:
show text "yay" at Position(xpos = 298, ypos=160, xanchor=0.5, yanchor=0.0)

How I've got it working in Renpy 7.4 is:
show text "{color=#FFF}{size=40} {font=my_custom_font.ttf}What would you like me to call you?{/font} {/size}{/color}" at Position(xpos = 400, ypos=50, xanchor=0.5, yanchor=0.0)
python:
name = renpy.input("What would you like me to call you?")
name = name.strip() or "friend"
hide text

Hope this helps <3

I'm building (likely have built by now) The Life Game at https://thelifega.me, my android and ios app focused on helping the user make life decisions.
Thanks <3,
-JB

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], simba975