Problem with the imagemap

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
Zearth
Newbie
Posts: 10
Joined: Sun Jun 21, 2009 3:43 pm
Contact:

Problem with the imagemap

#1 Post by Zearth » Sun Jun 21, 2009 3:48 pm

Hi everybody. First, thanks a lot for this wonderful software :)

I have a problem with the imagemap. In fact, i don't understand how find the points coordinates and in which order we must enter them.

Help ><
I searched in the forum but i didnt find.

PS : Sorry if my english isn't correct, i'm french ><

User avatar
JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Problem with the imagemap

#2 Post by JQuartz » Sun Jun 21, 2009 10:33 pm

First open the image using MS Paint (or any other similar software) then find the position of X1,Y1 and X2,Y2 by placing the cursor at the top left corner(X1,Y1) and bottom right corner(X2,Y2) of the button(as shown in the image, with the cursor represented by the red arrows)
Image
Then place the X1,Y1,X2,Y2 into the four numbers(eg.([X1], [Y1], [X2] ,[Y2], "Start Game")

Zearth wrote:In fact, i don't understand how find the points coordinates and in which order we must enter them.
One way to find coordinates is to use MS Paint and place the cursor(represented by the black arrow in this example) on a point of the image. The coordinates will be shown in the lower right corner of the window(red circle)
Image
renpy manual wrote:hotspots - A list of tuples defining the hotspots in this image map. Each tuple has the format (x0, y0, x1, y1, result). (x0, y0) gives the coordinates of the upper-left corner of the hotspot, (x1, y1) gives the lower-right corner, and result gives the value returned from this function if the mouse is clicked in the hotspot.
The manual is here:http://www.renpy.org/wiki/renpy/doc/ref ... y.imagemap

Then place the X1,Y1,X2,Y2 into the four numbers(eg.([X1], [Y1], [X2] ,[Y2], "Start Game"),
Last edited by JQuartz on Mon Jul 13, 2009 9:06 pm, edited 3 times in total.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Zearth
Newbie
Posts: 10
Joined: Sun Jun 21, 2009 3:43 pm
Contact:

Re: Problem with the imagemap

#3 Post by Zearth » Mon Jun 22, 2009 7:37 am

Thank you i'll try it ><

Post Reply

Who is online

Users browsing this forum: philat