Is it possible to change the layout of quick menus when switching from ADV-mode to NVL-mode?
I have the ADV quick menu all sorted out, but is there like, a condition I can use in screens.rpy for the quick menu to change its appearance when switching to NVL mode?
Switching Quick Menus?
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.
- madocallie
- Regular
- Posts: 45
- Joined: Tue May 14, 2013 1:57 am
- Completed: Bad Faith (DEMO), When We First Met, Party Favors
- Projects: Bad Faith (Full Release)
- itch: madocallie
- Location: UK
- Discord: madocallie#2937
- Contact:
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: Switching Quick Menus?
I can't find variable needed in the documentation, so here is my take on making one up:
First, declare a boolean variable:
In "screens.rpy" search for "screen nvl". Then add two line of code:
Now you have a variable to check when NVL screen is showing:
It's rather strange that there is no existing check for ADV or NVL mode. Maybe I miss something, but oh well, there is workaround.
EDIT: Turn out there is a way to check ADV or NVL mode.
First, declare a boolean variable:
Code: Select all
default nvl_showing = False
Code: Select all
screen nvl(dialogue, items=None):
# Add these two lines.
on "show" action SetVariable("nvl_showing", True)
on "hide" action SetVariable("nvl_showing", False)
Code: Select all
screen quick_menu():
if nvl_showing == False:
# ADV quick menu
else:
# NVL quick menu
EDIT: Turn out there is a way to check ADV or NVL mode.
Code: Select all
if renpy.get_mode() == "nvl":
Last edited by Divona on Tue Nov 07, 2017 1:43 pm, edited 2 times in total.
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: Switching Quick Menus?
The method above does have an issue, though. If "window hide" is use, the variable reset to False. Another way to do it is to set the variable in two places.
First for ADV:
Now for NVL:
First for ADV:
Code: Select all
screen say(who, what):
style_prefix "say"
on "show" action SetVariable("nvl_showing", False)
Code: Select all
screen nvl(dialogue, items=None):
on "show" action SetVariable("nvl_showing", True)
- madocallie
- Regular
- Posts: 45
- Joined: Tue May 14, 2013 1:57 am
- Completed: Bad Faith (DEMO), When We First Met, Party Favors
- Projects: Bad Faith (Full Release)
- itch: madocallie
- Location: UK
- Discord: madocallie#2937
- Contact:
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot]