Ren'Py: Hamburger Quick Menu (implementation)
Since I got asked about the hamburger for the quick menu buttons, I'm sharing my code here. As it's not so long ago that I've started learning Ren'Py, I can't guarantee that it is the best way to implement this. I mainly pieced it together from different topics on Ren'Py forums on how to implement a GUI with extra screen popping out. The logic can be used for any type of screen element.
The edits are done in screens.rpy, and mainly consist of four parts:
[1] Add boolean variable to remember the state of the hamburger (whether it is open or closed). Do this at the start of script.
[2] Editing the existing screen quick_menu()
[3] Add a new screen with the content in the hamburger, in this case: the quick buttons. I called this screen quick_buttons().
[4] style definitions for the buttons
Files
Get The Snowperson [Demo, Winter VN Jam 2021]
The Snowperson [Demo, Winter VN Jam 2021]
Experience the harsh world from the perspective of a freshly awakened snowperson, before winter ends.
Status | Released |
Authors | Gaming Variety Potato, Kochabi, RunnerGuitar @RunnerGuitar |
Genre | Visual Novel |
Tags | artgame, Atmospheric, Christmas, Experimental, Horror, Minimalist, Psychological Horror, Ren'Py, Surreal, winter |
Languages | English |
Accessibility | One button |
Comments
Log in with itch.io to leave a comment.
Hi, I'm using the code for something similar to this. But I'd like to hide it during certain scenes. Is there any way to hide it manually as needed?
Do you mean force-shrink the menu hamburger at certain story moments (f.e. CGs)? quick_menu_is_open is a newly added Ren'Py variable, so you should be able to easily control its value in Ren'Py scripts where you want it to happen.
Force shrink hamburger:
Force open hamburger:
---
Or if you mean hiding everything that has to do with quick menu buttons.
The big button's visibility is controlled by the quick_menu variable (I kept the same name as Ren'Py's default), and right now the 6 quick buttons are separate from this. This is my first project and it's been ages, but I've now rechecked and notice that it is a bit of oversight to not write the following check in screen quick_buttons() in the following way:
By applying this change, then you can use these following statements.
Force hide quick buttons:
Force show quick buttons: