[Solved] Graying out a choice in the choice menu?
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.
- ketskari
- Veteran
- Posts: 290
- Joined: Tue Dec 21, 2010 6:22 pm
- Completed: Asher, Sunrise, Tell a Demon
- Projects: Asher Remake, TEoA
- Organization: Sun Labyrinth
- Tumblr: sunlabyrinth
- Deviantart: sunlabyrinth
- itch: sunlabyrinth
- Contact:
[Solved] Graying out a choice in the choice menu?
Is there a way to gray out a menu choice option like the insensitive setting for a button in a screen?
Last edited by ketskari on Wed Mar 29, 2017 9:27 pm, edited 1 time in total.
- Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Graying out a choice in the choice menu?
Yes. You would need to modify choice screen to do that, though. One example:
Code: Select all
screen choice(items):
style_prefix "choice"
vbox:
for i in items:
if i.caption.startswith('!!'):
textbutton i.caption.strip('!') action None
else:
textbutton i.caption action i.action
# Usage:
menu:
'normal text':
pass
'!!disabled text':
pass< < insert Rick Cook quote here > >
- ketskari
- Veteran
- Posts: 290
- Joined: Tue Dec 21, 2010 6:22 pm
- Completed: Asher, Sunrise, Tell a Demon
- Projects: Asher Remake, TEoA
- Organization: Sun Labyrinth
- Tumblr: sunlabyrinth
- Deviantart: sunlabyrinth
- itch: sunlabyrinth
- Contact:
Re: Graying out a choice in the choice menu?
Interesting idea--I'll play around with it. Thank you!
EDIT: That's more convenient than I thought. For others interested in something like this, I implemented it like so:
EDIT: That's more convenient than I thought. For others interested in something like this, I implemented it like so:
Code: Select all
vbox:
style_prefix "choice"
for i in items:
if i.caption.startswith('@'):
if route3 == True:
textbutton i.caption.strip('@') action i.action
else:
textbutton i.caption.strip('@') action None at faded_btn
else:
textbutton i.caption action i.action
transform faded_btn:
alpha .6
Who is online
Users browsing this forum: Google [Bot]