Hi, everyone.
This question can be pathetic
But how can I automatically set the button as "selected"?
Set button selected automatically
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.
- Steamgirl
- Veteran
- Posts: 322
- Joined: Sat Jul 28, 2012 4:39 am
- Completed: My Cup of Coffee, Queen at Arms (co-wrote a battle scene)
- Projects: Stranded Hearts, Emma: A Lady's Maid
- Deviantart: steamgirlgame
- Contact:
Re: Set button selected automatically
Do you mean by default? If your button has an action associated with it, such as setting a variable, it will automatically be "selected" if the variable is set to the same number as the button sets it to.
Hobby Projects: Stranded Hearts | Emma: A Lady's Maid | My Cup of Coffee: The Trouble with Earl Grey
- sashaaero
- Regular
- Posts: 45
- Joined: Mon Jul 13, 2015 6:08 pm
- Projects: Everlasting Cold
- Organization: OverDream Development
- Github: sashaaero
- Skype: sashaaero
- Contact:
Re: Set button selected automatically
You mean likeSteamgirl wrote:Do you mean by default? If your button has an action associated with it, such as setting a variable, it will automatically be "selected" if the variable is set to the same number as the button sets it to.
Code: Select all
textbutton "some name" action SetVariable("...", 12345)
- Steamgirl
- Veteran
- Posts: 322
- Joined: Sat Jul 28, 2012 4:39 am
- Completed: My Cup of Coffee, Queen at Arms (co-wrote a battle scene)
- Projects: Stranded Hearts, Emma: A Lady's Maid
- Deviantart: steamgirlgame
- Contact:
Re: Set button selected automatically
Sort of. First you set the variable.
Now the button which has the same value will be selected by default.
Code: Select all
$ variable = 12345
Code: Select all
textbutton "Selected" action SetVariable("variable", 12345)
textbutton "Not selected" action SetVariable("variable", 98765)
Hobby Projects: Stranded Hearts | Emma: A Lady's Maid | My Cup of Coffee: The Trouble with Earl Grey
Who is online
Users browsing this forum: Majestic-12 [Bot], Rhapsy