How to add extra menu in hotspots?
Forum rules
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
How to add extra menu in hotspots?
I don't know if this has been answered already but, I really want to put an extra menu in my main menu screen, using hotspots. So in my extra menu I want to add credits and maybe little bios of character. I don't exactly know how to create a code like so.
- chocoberrie
- Veteran
- Posts: 254
- Joined: Wed Jun 19, 2013 10:34 pm
- Projects: Marshmallow Days
- Contact:
Re: How to add extra menu in hotspots?
Hotspots are used in imagemaps. If you want to add another hotspot, all you need to do is add... well, another one, and add an action to it that shows the extra "menu." The action ShowMenu is used for game menus, but not regular screens. To show a regular screen, you need to use Show(screen name here). (See the Ren'Py documentation here about actions for screens.)
It would look like this:
In the above code, action Show(bonus) is the action for the hotspot. Note that bonus is the label used for the Bonus screen, if I want one of those. You can use any label name you want, as long as it doesn't have spaces in it (e.g. chara_gallery, music_room, etc.).
In order for the Bonus screen to appear when the hotspot is clicked on, I would have to add it in screens.rpy and customize it. Like this:
It would look like this:
Code: Select all
screen main_menu:
tag menu
imagemap:
ground "FILE NAME HERE"
idle "FILE NAME HERE"
hover "FILE NAME HERE"
alpha False
# This is so that everything transparent is invisible to the cursor.
hotspot (#, #, #, #) action Start()
hotspot (#, #, #, #) action ShowMenu("load")
hotspot (#, #, #, #) action ShowMenu("preferences")
hotspot (#, #, #, #) action Show(bonus)
hotspot (#, #, #, #) action Help()
hotspot (#, #, #, #) action Quit(confirm=False)
In order for the Bonus screen to appear when the hotspot is clicked on, I would have to add it in screens.rpy and customize it. Like this:
Code: Select all
screen bonus:
tag menu
# customize the menu here
- chocoberrie
- Veteran
- Posts: 254
- Joined: Wed Jun 19, 2013 10:34 pm
- Projects: Marshmallow Days
- Contact:
Re: How to add extra menu in hotspots?
Also, this question should be posted in the Ren'Py Questions & Announcements forum, not in the Cookbook.
Re: How to add extra menu in hotspots?
OH MY GOD. I didn't realize it was.
Who is online
Users browsing this forum: No registered users