How to change ui.input into a button?
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.
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.
Re: How to change ui.input into a button?
I presume what OP wants is multiple input fields that the user can click on to focus and type in directly in the field. Roughly similar to what is described here: http://lemmasoft.renai.us/forums/viewto ... =8&t=29210
I have nothing to add to the conversation in terms of how to do it (never thought about it), but thought since this thread is going in circles...
I have nothing to add to the conversation in terms of how to do it (never thought about it), but thought since this thread is going in circles...
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: How to change ui.input into a button?
Wait, that's where I got my original ui.input idea anyway, but nobody could help that guy either D:
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: How to change ui.input into a button?
Code: Select all
hbox xpos 200 ypos 200:
vbox:
frame:
hbox:
input default "hi"
$ first_name = inputCode: Select all
hbox xpos 200 ypos 200:
vbox:
frame:
hbox:
focus input default "hi"
$ first_name = inputRe: How to change ui.input into a button?
So what you want is textbox that is always visible that you can type into at any time just by clicking on it?
Re: How to change ui.input into a button?
You could try something like this:
It will not freeze the game and you can type whenever you please.
Code: Select all
init python:
def func(newstring):
store.var = newstring
screen input_testing():
input default "hi" changed func
label start:
$ var = "meow"
show screen input_testing
"[var]"
"[var]"
"[var]"
"[var]"
"[var]"
"[var]"
"[var]"
"[var]"Re: How to change ui.input into a button?
This works really well:
Code: Select all
init python:
def func(newstring):
store.var = newstring
screen input_testing():
button:
id "Meow"
xysize (300, 25)
action NullAction()
add Input(default=var, changed=func, button=renpy.get_widget("input_testing", "Meow")) yalign 1.0
label start:
$ var = "Meow"
show screen input_testing
"[var]"
"[var]"
"[var]"
"[var]"
"[var]"
"[var]"
"[var]"
"[var]"Re: How to change ui.input into a button?
And you can mix them... there is absolutely nothing preventing that. It's just that ui module is pretty much obsolete at this point and ui.input is nothing but a reference to Input class from behavior file anyway.namastaii wrote:The problem with that is that is ren'py language. Which means I can't mix the ui python screen with ren'py statements. Plus, that input statement doesn't have button capability XD
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: How to change ui.input into a button?
Thank you, I'm about to try it out.
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: How to change ui.input into a button?
hold on,I think i know why XD
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: How to change ui.input into a button?
Thank you. It only works when the mouse is hovered over it though. Is that kinda weird?
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: How to change ui.input into a button?
Yeah, instead of clicking on it, i have to put my mouse over it but if i move the mouse, i can't type in it anymore XD weird, since it says button...
Re: How to change ui.input into a button?
I wrote earlier that it's how it is coded to work...namastaii wrote:Yeah, instead of clicking on it, i have to put my mouse over it but if i move the mouse, i can't type in it anymore XD weird, since it says button...
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: How to change ui.input into a button?
Ah, okay. Do you know how I could make it so even if it's not focused on a text input, that it'll still be focused on the last one it WAS focused on so if they do type something it will appear in the last box they had selected? the only reason i ask is because thats how Magical Diarys character creation screen is like. But if not, I'm sure it's not a big deal. I really appreciate you fixing this for me thanks ^^
Re: How to change ui.input into a button?
I once again do not understand what you're asking 
I'll download the demo to see how it works there...
I'll download the demo to see how it works there...
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]

