I have a game menu which opens in the middle of the screen, leaving the rest of the game visible. I just noticed that when the game menu appears it hides the screens currently shown. I'm guessing this is because the game menu when called through ShowMenu is called in a new context?
Is there a way around this? I don't think the solution would be to call the game menu with the Show action instead of ShowMenu action because if we are in the same context gameplay continues and a save screenshot will also make a screenshot of the gamemenu itself. So I do want the game menu to be in new context (pause current gameplay) just not hide the screens already shown. Doable?
[SOLVED] Menu hides screens
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.
[SOLVED] Menu hides screens
Last edited by nananame on Fri Sep 25, 2020 11:51 am, edited 1 time in total.
- RicharDann
- Veteran
- Posts: 286
- Joined: Thu Aug 31, 2017 11:47 am
- Contact:
Re: Menu hides screens
You can use Show action instead of ShowMenu, if you want other screens to stop receiving input add modal True clause to your screen:
Just make sure your screen also has some way for the player to quit it once they want to continue the game, like adding a button or setting a key (like the right mouse button) with a Hide('my_game_menu') action.
Code: Select all
screen my_game_menu():
modal True
The most important step is always the next one.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Menu hides screens
If you are okay with those screens being visible on any game menu you could remove the screens layer from config.context_clear_layers
define config.context_clear_layers = [ 'screens' ]
A list of layers that are cleared when entering a new context.
define config.context_clear_layers = [ 'screens' ]
A list of layers that are cleared when entering a new context.
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Re: Menu hides screens
That's what I was looking for! Thanks!
Who is online
Users browsing this forum: No registered users