A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
-
beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
-
Contact:
#1
Post
by beastcarving » Wed Sep 11, 2019 5:54 pm

Does anyone know how to add little cards when hovering over a button? I've got some feedback about my menus, and I'd like if an info card could give a definition of each button. For example, this is my load/save menu and those light bulbs are previous and advance buttons. I'd like for the card to say next and previous when hovered over.
this is what my menu looks like now:;
Code: Select all
imagemap:
ground "blank.png"
idle "lb2.png"
hover "lb1.png"
cache False
alpha False
hotspot (1223,1,175,315) clicked FilePageNext(20) activate_sound "clack.mp3" hover_sound "clink.mp3"
hotspot (1,2,202,315) clicked FilePagePrevious(1) activate_sound "clack.mp3" hover_sound "clink.mp3"
-
namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
-
Contact:
#2
Post
by namastaii » Thu Sep 12, 2019 12:02 am
You could add the card art to your imagemap idle image and place the hotspot under an if statement with a null action (action NullAction())
have a screen variable that you change with hovering over the hotspots
something like this? (untested)
Code: Select all
default next_card = False
default previous_card = False
imagemap:
ground "blank.png"
idle "lb2.png"
hover "lb1.png"
cache False
alpha False
hotspot (1223,1,175,315) clicked FilePageNext(20) hovered SetScreenVariable("next_card", True) unhovered SetScreenVariable("next_card", False) activate_sound "clack.mp3" hover_sound "clink.mp3"
hotspot (1,2,202,315) clicked FilePagePrevious(1) hovered SetScreenVariable("previous_card", True) unhovered SetScreenVariable("previous", False) activate_sound "clack.mp3" hover_sound "clink.mp3"
if next_card:
hotspot (the correct hotspots here) action NullAction()
if previous_card:
hotspot (etc) action NullAction()
You don't have to put it on your imagemap image directly either, you could also put text or an image/imagebutton under the if statements as well.
Users browsing this forum: Bing [Bot]