Question about imagemaps2

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
Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Question about imagemaps2

#1 Post by Gouka » Sun Dec 28, 2008 10:10 pm

in order to get the menu I'm trying to implement into ren'py. What would be the coordinates?

Thanks for your help.
Attachments
mainmenu1.png
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

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: Question about imagemaps2

#2 Post by JQuartz » Sun Dec 28, 2008 11:27 pm

Maybe 5,20? The best way to find out the coordinates is still trial and error.
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.

User avatar
F.I.A
Miko-Class Veteran
Posts: 546
Joined: Wed Sep 21, 2005 10:49 pm
Projects: Winter Shard, EVE, Hyperion
Contact:

Re: Question about imagemaps2

#3 Post by F.I.A » Mon Dec 29, 2008 12:10 am

Gouka wrote:in order to get the menu I'm trying to implement into ren'py. What would be the coordinates?

Thanks for your help.
If you are using the same resolution, then:

Code: Select all

init -2 python:
    layout.imagemap_main_menu("mainmenu1.png", "mainmenu1.png", [
        (10, 42, 250 ,88, "Start Game"),
        (10, 98, 250, 144, "Load Game"),
        (10, 156, 250, 202, "Preferences"),
        (10, 219, 250 ,266, "Quit"),
        ])
Change the last mainmenu1.png to your desired image for the hovered image.



Foolproof way of identifying the axises:
1. Open the image with bitmap.
2. Hover the pointer at the upper left edge.
3. Jolt down the axises displayed at the bottom right corner.
4. Repeat 2 and 3 for the bottom right edge.
「通りすがりのメーカだ。覚えとけ。」

----------
Winter shard
Image
WIP: Hyperion(Trace unknown), ?????(Progressing)

Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Re: Question about imagemaps2

#4 Post by Gouka » Mon Dec 29, 2008 12:31 pm

F.I.A wrote:
Gouka wrote:in order to get the menu I'm trying to implement into ren'py. What would be the coordinates?

Thanks for your help.
If you are using the same resolution, then:

Code: Select all

init -2 python:
    layout.imagemap_main_menu("mainmenu1.png", "mainmenu1.png", [
        (10, 42, 250 ,88, "Start Game"),
        (10, 98, 250, 144, "Load Game"),
        (10, 156, 250, 202, "Preferences"),
        (10, 219, 250 ,266, "Quit"),
        ])
Change the last mainmenu1.png to your desired image for the hovered image.



Foolproof way of identifying the axises:
1. Open the image with bitmap.
2. Hover the pointer at the upper left edge.
3. Jolt down the axises displayed at the bottom right corner.
4. Repeat 2 and 3 for the bottom right edge.
Thanks a lot, this really helped. But on your suggestion about bitmaps, which program do I use? Microsoft paint or photoshop?
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: Question about imagemaps2

#5 Post by akemicchi » Mon Dec 29, 2008 12:40 pm

It really doesn't matter what program you use to find the coordinates. You can use either Photoshop and Microsoft Paint.

... Microsoft Paint is simpler though since all you have to do is hover over the image with any tool and it automatically shows the coordinates on the bottom right. 8D

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot