Is it possible to make the choice menu show up as part of the normal text in the NVL window rather than displaying two buttons on a blank screen? If it's possible, could you give me some advice or an example, please?
I looked at ui.menu, but there's no example there (yet).
Changing choice menu to embed it in the NVL window.
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.
- PyTom
- Ren'Py Creator
- Posts: 16088
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Changing choice menu to embed it in the NVL window.
Yes. To do this, you need two steps:
1) Set button_menu = False in the call to theme.roundrect in options.rpy.
2) Add to your game the following code:
You want to follow each menu with "nvl clear", since the menu doesn't get put into the NVL buffer.
1) Set button_menu = False in the call to theme.roundrect in options.rpy.
2) Add to your game the following code:
Code: Select all
init:
$ menu = nvl_menu
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Changing choice menu to embed it in the NVL window.
Looks like that did the trick. Is there a way to style it? I tried style.nvl_menu, but with no luck... I'd like to change the text color, highlight color, and x positioning... I'd also like to be able to change where the highlight begins so that it highlights only the text of the choice rather than the number plus the text.
- PyTom
- Ren'Py Creator
- Posts: 16088
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Changing choice menu to embed it in the NVL window.
I forget what the style is, but there's an easy way to find out. Hover over the menu, and hit shift+I to call up the style inspector... it should tell you what the styles are.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Changing choice menu to embed it in the NVL window.
Looking at the focus properties... it looks like it's impossible to have a highlight that covers just the text, since the length of the text varies between menu points. Am I correct, or am I missing something?
Re: Changing choice menu to embed it in the NVL window.
So, just a bump... is it possible to change the highlight color and make it variable width so that it only covers the area of the text for the option?
- PyTom
- Ren'Py Creator
- Posts: 16088
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Changing choice menu to embed it in the NVL window.
IIRC, you could do it perhaps by setting style.nvl_menu_choice_button.xfill to False/
This would work so long as the menu choice is one line long.
This would work so long as the menu choice is one line long.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: Google [Bot]