[SOLVED] SetVariable idle/selected behaviour

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
SinnyROM
Regular
Posts: 166
Joined: Mon Jul 08, 2013 12:25 am
Projects: Blue Birth
Organization: Cosmic Static Games
Contact:

[SOLVED] SetVariable idle/selected behaviour

#1 Post by SinnyROM »

Hey, I'm not sure if this is a bug or if it's expected behaviour.

I give a button the action SetVariable(name,value) starting in the idle state.
After clicking on the button, it goes to the selected state.
After clicking elsewhere, the button is still in selected state.
It remains selected until that game ends.

I attached some screenshots of what I saw in regards to the Prefs button in the quick menu.
Attachments
Prefs textbutton, selected state, after clicking and returning from the preferences screen
Prefs textbutton, selected state, after clicking and returning from the preferences screen
Prefs textbutton, idle state, before clicking
Prefs textbutton, idle state, before clicking
Last edited by SinnyROM on Mon Apr 27, 2015 7:20 pm, edited 1 time in total.

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: SetVariable idle/selected behaviour

#2 Post by xavimat »

I don't understand why you put a "SetVariable" action in the Prefs button of the quick menu, but anyway, the answer is "expected behavior". A button that sets a variable to a value is "selected" if that variable has that value.
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
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: SetVariable idle/selected behaviour

#3 Post by Alex »

That's how it goes. For more information, read this post - http://lemmasoft.renai.us/forums/viewto ... ed#p322596

edit: i'm sloooow

User avatar
SinnyROM
Regular
Posts: 166
Joined: Mon Jul 08, 2013 12:25 am
Projects: Blue Birth
Organization: Cosmic Static Games
Contact:

Re: SetVariable idle/selected behaviour

#4 Post by SinnyROM »

Using Prefs was a quick example, just to make sure I wasn't going nuts. Thanks to the both of you! The link was very enlightening.

Post Reply

Who is online

Users browsing this forum: No registered users