visible, but inactive menu options
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.
- pucedragonlord
- Regular
- Posts: 159
- Joined: Wed May 09, 2012 2:49 am
- Projects: The Diviner
- Organization: Two Crowns Entertainment
- Location: Now: Charlottesville, VA
- Contact:
visible, but inactive menu options
Is there a way I can get a menu: to have an inactive, but visible option in it? It's just an aesthetic thing I'd like to have, and I'm curious if there's some simple way to do it before I go and make my own custom menus.
The more you know
-
pwisaguacate
- Veteran
- Posts: 356
- Joined: Mon Mar 11, 2013 11:03 pm
- Contact:
Re: visible, but inactive menu options
I don't know how to gray out a menu choice, so if anybody could tell us, then that would be helpful.
Here's a simple snippet where choosing the "inactive" choice loops back:
Here's a simple snippet where choosing the "inactive" choice loops back:
Code: Select all
label menu1:
menu:
"Enter the room.":
jump enter
"[Leave.]" if leave_unlock == False:
# "I haven't checked the room yet." # Optional message
jump menu1 # Forces the player to repeat the menu
"Leave." if leave_unlock == True:
jump leave- 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: visible, but inactive menu options
Yeah, That's what I've done in the meantime.
It would be a neat little feature, though, I think. There's something different about a choice that's there, but you can't touch.
It would be a neat little feature, though, I think. There's something different about a choice that's there, but you can't touch.
The more you know
- wyverngem
- Miko-Class Veteran
- Posts: 615
- Joined: Mon Oct 03, 2011 7:27 pm
- Completed: Simple as Snow, Lady Luck's Due,
- Projects: Aether Skies, Of the Waterfall
- Tumblr: casting-dreams
- itch: castingdreams
- Location: USA
- Contact:
Re: visible, but inactive menu options
Code: Select all
menu:
"Question"
"Option 1":
pass
"Option 2":
"Do stuff."
"Continue here."- 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: visible, but inactive menu options
still not quite the same thing, I'm afraid.
It's not that the button shouldn't do anything, it's that it should bi visible, but un-selctable. Greyed and inactive.
At this point I think I'll just have to make my own custom menu that can do that
It's not that the button shouldn't do anything, it's that it should bi visible, but un-selctable. Greyed and inactive.
At this point I think I'll just have to make my own custom menu that can do that
The more you know
-
Cabriolean
- Regular
- Posts: 44
- Joined: Sun Dec 09, 2012 6:59 am
- Contact:
Re: visible, but inactive menu options
One thing I did while playing around was figure out exactly where I wanted all my buttons, then edit the inactive button into the background image, so it wasn't actually technically a button at all, yes, I am fun when drunk..... No, I don't need an inactive button, I don't even really want one, but I am a weird but fairly stationary drunk, and my flatmates were giving me a headache.pucedragonlord wrote:still not quite the same thing, I'm afraid.
It's not that the button shouldn't do anything, it's that it should bi visible, but un-selctable. Greyed and inactive.
At this point I think I'll just have to make my own custom menu that can do that
I have a special set of files for drunk editing. This is because I do things like turn the buttons opaque and green, I also disable the help button, I actually kind of like the way it looks (not the green one, the translucent one), but not much use, for me anyway, although I did briefly consider turning the whole thing into a horror, this is why I disabled the help button, I think, I'm going off the weird bits of dialogue and crazy #notes, but zombies and vampires seemed to be the gist of it.
-
pwisaguacate
- Veteran
- Posts: 356
- Joined: Mon Mar 11, 2013 11:03 pm
- Contact:
Re: visible, but inactive menu options
Two weeks have passed, but I just realized that the easiest way to have a menu with an inactive choice is to simply define a screen with textbuttons and assign "action None" to whichever one is to be made inactive.
The following example copies the default choice menu style and uses a variable to activate the inactive button:
(Here is a much simpler example, which keeps a choice permanently inactive:)
The following example copies the default choice menu style and uses a variable to activate the inactive button:
Code: Select all
init:
$ btn_width = int(config.screen_width * 0.75)
$ flag = False
screen ex_menu_with_inactive:
vbox xalign 0.5 yalign 0.5:
textbutton "Exit demo." action Return() xminimum btn_width
if not flag:
textbutton "(Quit first to activate button.)" action None xminimum btn_width
else:
textbutton "(LOL) Rage Quit" action Quit() xminimum btn_width
label start:
"DEMO: a custom choice menu with an inactive button"
call screen ex_menu_with_inactive
"Just kidding. The second choice is now activated."
$ flag = True
call screen ex_menu_with_inactive
jump start
Code: Select all
init:
$ btn_width = int(config.screen_width * 0.75)
screen menu_ask:
vbox xalign 0.5 yalign 0.5:
textbutton "(LOCKED: not enough manliness)" action None xminimum btn_width
textbutton "... to ask her later." action Jump("later") xminimum btn_width
label start:
[...]
call screen menu_ask:
label later:
[...]
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], zyric
