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:

How to change ui.input into a button?

#1 Post by namastaii »

I've got the ui.input to work as a text entry on screen, however I don't want it to freeze at the text entry..I want the button part to be enabled so the text entry only works when its selected..

http://www.renpy.org/wiki/renpy/doc/ref ... s/ui.input

I don't understand what I put for button in the parenthesis, all it gives me for an example is button=None

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?

#2 Post by namastaii »

Can I bump my own thread?

*bump*

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?

#3 Post by xela »

A lot of the people here are not native English speakers, you can bump your own thread but I for once still don't have a clue about what you're asking :D
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?

#4 Post by namastaii »

It's for programming.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

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

#5 Post by xavimat »

I agree with xela.
Could you explain what do you want to do?
I mean, not "I want to use an ui.xxx for something", but "I want to do XXX".
I'm not familiar with old ui. functions, but I presume that screen language can do what you want.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

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?

#6 Post by namastaii »

I just need to know what I properly put after button= because the only instructions the renpy site gives is if I want it set to false like so: ui.input(button=None) I just want the UI input to be selectable but I can't figure out the right syntax. It's a text box like raw input.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

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

#7 Post by nyaatrap »

ui.input is rarely used recently. http://www.renpy.org/doc/html/screens.html#input is what you want to implement instead of old ui functions. Unless you're a python wizard, there's no reason to use old ui functions, and it's hard to give you an advice.

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?

#8 Post by xela »

I think it wants a button instance or possibly anything that has hover states. I've read the input code and it looks like it will allow input only when you hover over that button.
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?

#9 Post by namastaii »

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

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?

#10 Post by namastaii »

Plus that shows up in dialogue. I need it on screen.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

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

#11 Post by nyaatrap »

I think a button can have an input as its child and you can control it to apply button properties in screen language. Anyway, What is your current code?

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?

#12 Post by namastaii »

I figured out how to make it work :) just had to define a screen outside.

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?

#13 Post by namastaii »

How would I go about adding a button argument? Because I have to input boxes, I need the person to be able to select each one separately..because its definitely not doing that right now :(

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

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

#14 Post by nyaatrap »

It's hard to guess what's you're doing without seeing any codes nor an screenshot what you want to accomplish ...

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?

#15 Post by namastaii »

Code: Select all

screen input_firstName:


    
    hbox xpos 200 ypos 200:
        focus input default " "
        $ first_name = input
I'm assuming it goes like this. But I can't see the text box so I'm trying to change it around so theres a background on the textbox

Post Reply

Who is online

Users browsing this forum: Google [Bot]