Imagemap Difficulty Due to Unusual buttons/hotspots [solved]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
quiltedcorgi
Newbie
Posts: 20
Joined: Fri Sep 18, 2015 11:51 am
Projects: Sheltered
Organization: Dwarf Dog Media
Location: Midwest USA
Contact:

Imagemap Difficulty Due to Unusual buttons/hotspots [solved]

#1 Post by quiltedcorgi »

I'm working on my first GUI for which I'm currently on the programming stage, but I'm wondering if I didn't bit off more than I can chew. Right now, I have two main questions.

The first:
As stated, I am doing this as an imagemap. I have a ground image and a hover image. I would also like to make use of an image for when something is clicked on. Is this what selected_hover or selected_idle would be (ie. selected_hover "ui/menus/mainmenu/mm_click.png")? From everything I've read, it seems like clicking on something is actually prompting action - not just selecting. Or would I put this under hotspot (coordinates) action and then insert the file name?
imagemap:

ground "ui/menus/mainmenu/mm_ground.png"
hover "ui/menus/mainmenu/mm_hover.png"
alpha False
cache False

hotspot (1,34,166,87) action Start() at buttonfade
hotspot (1,182,166,86) action ShowMenu('load') at buttonfade
hotspot (1,330,166,87) action ShowMenu('Extras') at buttonfade
hotspot (1,481,166,88) action ShowMenu("Settings") at buttonfade
hotspot (656,460,110,116) action Quit(confirm=False) at buttonfade


This is what I would LIKE it to do:

GROUND
Image
HOVER (draws the bone out and the paw print enlarges)
Image
CLICKED ON/SELECTED
Image

Second Question:
I'm having difficulty getting the imagemap hotspots to move correctly from ground to hover due to the unusual dog bone shapes. I don't want the image to move to hover if the player's cursor is not over the correct spots; however, if I make the area coordinates smaller than the complete, it only shifts a small section and the effect is ruined. Is there a way to get a more specific area/unusual shape?
Last edited by quiltedcorgi on Sun Sep 20, 2015 1:30 pm, edited 1 time in total.

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Imagemap Difficulty Due to Unusual buttons/hotspots

#2 Post by philat »

Use imagebuttons instead of imagemap. viewtopic.php?f=51&t=22565

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: Imagemap Difficulty Due to Unusual buttons/hotspots

#3 Post by OokamiKasumi »

The key to the problem as an ImageMap is to use the Largest image of all three (Hover, Selected, Idle...) for your coordinates. The HOVER image is clearly the largest, so use the HOVER image when you record your X, Y, etc... coordinates for your hotspots.

Also!
-- Put enough SPACE above and below to cut a clean line between your imagemap images, or they'll cut each other off.
-- Make your current GROUND image the IDLE image, and use a BLANK (transparent) image for the Ground. You can also use the main background image for the Ground.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

quiltedcorgi
Newbie
Posts: 20
Joined: Fri Sep 18, 2015 11:51 am
Projects: Sheltered
Organization: Dwarf Dog Media
Location: Midwest USA
Contact:

Re: Imagemap Difficulty Due to Unusual buttons/hotspots

#4 Post by quiltedcorgi »

Thank you both. It seems that solved that particular issue (I think). I spent yesterday redoing what I had making everything into an imagebutton, as per the GUI sample. Then, switching everything I was using as ground to idle really helped. Unfortunately, I now have a bunch of other errors to deal with, so I'm unable to see how much a difference it made, lol.

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]