Question about button selected state

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
pucedragonlord
Regular
Posts: 159
Joined: Wed May 09, 2012 2:49 am
Projects: The Diviner
Organization: Two Crowns Entertainment
Location: Now: Charlottesville, VA
Contact:

Question about button selected state

#1 Post by pucedragonlord »

I'm curious as to what all makes a button appear in the selected state and what doesn't. From what I've found so far, having a normal variable match a button's action does, but something like opening a menu with a button or changing a tooltip on click doesn't change the state. How exactly do these buttons decide whether they should be in the selected position or not?

I ask partly out of curiosity, but partly out of wanting some menu buttons to stay highlighted when they show parts of a screen or open a menu. I suppose I could attach a bunch of variables to them, but I've had trouble with variable scope and screens before, and it seems silly to have a bunch of variables that are only used to toggle button states.
The more you know

User avatar
saguaro
Miko-Class Veteran
Posts: 560
Joined: Sun Feb 12, 2012 9:17 am
Completed: Locked-In, Sunrise, The Censor
Organization: Lucky Special Games
itch: saguarofoo
Location: USA
Contact:

Re: Question about button selected state

#2 Post by saguaro »

I got a good explanation on this here:

http://lemmasoft.renai.us/forums/viewto ... te#p322596

pucedragonlord
Regular
Posts: 159
Joined: Wed May 09, 2012 2:49 am
Projects: The Diviner
Organization: Two Crowns Entertainment
Location: Now: Charlottesville, VA
Contact:

Re: Question about button selected state

#3 Post by pucedragonlord »

neat, looks like I'll be defining some custom actions.

It doesn't mention show or show menu, though. Any idea if either of those have any sort of selected behavior, or are they meant to always leave things unselected?
The more you know

Post Reply

Who is online

Users browsing this forum: No registered users