Page 1 of 1
visible, but inactive menu options
Posted: Sun Apr 21, 2013 2:13 pm
by pucedragonlord
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.
Re: visible, but inactive menu options
Posted: Sun Apr 21, 2013 4:10 pm
by pwisaguacate
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:
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
Re: visible, but inactive menu options
Posted: Sun Apr 21, 2013 4:30 pm
by pucedragonlord
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.
Re: visible, but inactive menu options
Posted: Sun Apr 21, 2013 9:55 pm
by wyverngem
Code: Select all
menu:
"Question"
"Option 1":
pass
"Option 2":
"Do stuff."
"Continue here."
You can use "pass" to skip and go to the next part.
Re: visible, but inactive menu options
Posted: Mon Apr 22, 2013 1:37 pm
by pucedragonlord
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
Re: visible, but inactive menu options
Posted: Tue Apr 23, 2013 4:03 am
by Cabriolean
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
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.
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.
Re: visible, but inactive menu options
Posted: Thu May 09, 2013 7:03 am
by pwisaguacate
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:
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
(Here is a much simpler example, which keeps a choice permanently inactive:)
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:
[...]