How to change ui.input into a button?

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.
Message
Author
User avatar
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?

#46 Post by namastaii » Sun Mar 15, 2015 2:37 pm

Is it because I'm using the old ui stuff along with the newer? Think I can put it all into one entity?

like it resets the text input completely back to nothing if i change the appearance after i put the name in. so it will only work if the last thing i change is the text.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: How to change ui.input into a button?

#47 Post by xela » Sun Mar 15, 2015 2:45 pm

namastaii wrote:Is it because I'm using the old ui stuff along with the newer? Think I can put it all into one entity?
New/Old stuff shouldn't matter. There is no good reason for you to use ui module anywhere in your code but it should not matter if you do. I am not sure what could force it to reset, maybe you can restart interaction in the functions or something...
Like what we're doing? Support us at:
Image

User avatar
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?

#48 Post by namastaii » Sun Mar 15, 2015 2:49 pm

...What if I made blank buttons where the name boxes are? and when the player clicks on the button, it opens up the input then when they push enter it closes it but shows the empty button again (but with the new string name displayed) i think I'm going to attempt this

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: How to change ui.input into a button?

#49 Post by xela » Sun Mar 15, 2015 2:57 pm

namastaii wrote:...What if I made blank buttons where the name boxes are? and when the player clicks on the button, it opens up the input then when they push enter it closes it but shows the empty button again (but with the new string name displayed) i think I'm going to attempt this
This is an option... but buttons will not change size with the input text if you simply open a new screen over them and if you add input to the buttons on conditioning, enter will not remove them (that's why I said you'll have to mess with the classes). If you're opening new screens with the buttons, it will work but it will freeze everything else.
Like what we're doing? Support us at:
Image

User avatar
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?

#50 Post by namastaii » Sun Mar 15, 2015 3:08 pm

Yeah, I'll have to mess around with what works best..I'm sure I'll come up with something eventually. And when I do, I'll post it here.

Post Reply

Who is online

Users browsing this forum: Google [Bot]