Main Menu problems with imagemap *solved*

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.
Post Reply
Message
Author
User avatar
Arithra
Regular
Posts: 194
Joined: Wed Jul 28, 2010 2:29 pm
Completed: Finding a prom date
Location: Germany
Contact:

Main Menu problems with imagemap *solved*

#1 Post by Arithra » Fri Aug 06, 2010 1:49 pm

Since I want to change the appearance of the main menu I decided to try using an image map.
But the game won't start when I try to use it. :(
where exactly do I have to put it?
I thought it would be the options.rpy under layouts, but it doesn't work.
This is the code I'm using.
Could somebody help me please?

Code: Select all

init -2 python:
    layout.imagemap_main_menu(
        "main_idle.jpg",
        "main_hover.jpg",
        [ 
        (594, 239, 711, 308, "Start Game"),
        (593, 306, 710, 375, "Load Game"),
        (580, 374, 709, 449, "Preferences"),
        (596, 447, 707, 522, "Quit"),
        ])
Last edited by Arithra on Sat Aug 07, 2010 7:53 am, edited 2 times in total.
Please visit my projects Perios- Chained Sorceress
and Final Banquet now with demo!

And my blog for more updates!

User avatar
Strum
Veteran
Posts: 215
Joined: Mon Sep 28, 2009 10:38 am
Contact:

Re: Main Menu problems with imagemap

#2 Post by Strum » Fri Aug 06, 2010 2:08 pm

you missed an "i" from init
Image

Simulacro
Regular
Posts: 35
Joined: Tue Aug 03, 2010 9:38 am
Contact:

Re: Main Menu problems with imagemap

#3 Post by Simulacro » Fri Aug 06, 2010 2:29 pm

Ooh, I like this. Would this be enough to override the main menu screen or do I have to do something else on the script?

EDIT: besides, of course, writing the commands for the result of the imagemap function.

User avatar
Arithra
Regular
Posts: 194
Joined: Wed Jul 28, 2010 2:29 pm
Completed: Finding a prom date
Location: Germany
Contact:

Re: Main Menu problems with imagemap

#4 Post by Arithra » Fri Aug 06, 2010 2:49 pm

I fixed the "i" but it still doesn't work.
Do I have to ad something else somewhere in the script or delet something?
Please visit my projects Perios- Chained Sorceress
and Final Banquet now with demo!

And my blog for more updates!

Simulacro
Regular
Posts: 35
Joined: Tue Aug 03, 2010 9:38 am
Contact:

Re: Main Menu problems with imagemap

#5 Post by Simulacro » Fri Aug 06, 2010 3:49 pm

I just wrote:

Code: Select all

init -2 python:
    layout.imagemap_main_menu("MEN Main BG.jpg", "MEN Main BG Hover.png", [
        (484, 383, 676, 415, "Start Game"),
        (484, 425, 796, 460, "Load Game"),
        (484, 466, 649, 501, "Preferences"),
        (484, 557, 562, 593, "Quit"),
        (484, 510, 504, 550, "Help"),
        ])
in my script.rpy without modifying anything else and I got it working. I didn't delete
anything or add anything else.

Are you getting to at least to an unresponsive menu screen?

EDIT: I am having problems with using this to jump to labels.
EDIT2: got it to work.

User avatar
Arithra
Regular
Posts: 194
Joined: Wed Jul 28, 2010 2:29 pm
Completed: Finding a prom date
Location: Germany
Contact:

Re: Main Menu problems with imagemap

#6 Post by Arithra » Fri Aug 06, 2010 5:48 pm

@Simulacro thanks for the help, but i thinks something else is wrong, since it didn't work even as I copied your code.
i know the problem with the images maps too, but when I copied this code and simply changed the names, it smehow worked.

Code: Select all

 $ result = renpy.imagemap("ground1.jpg", "hover1.jpg", [
        (30, 81, 287, 490, "yuuto"),
        (284, 83, 549, 484, "keiji"),
        (544, 86, 793, 483, "tatsuya"),
        ], focus="imagemap")

    if result == "yuuto":
        if yuuto_story:
            jump imm
        a "...!"
        jump yuutoscene1
    elif result == "keiji":
        if keiji_story:
            jump imm
        a "...!"
        jump keijiscene1
    elif result == "tatsuya":
        if tatsuya_story:
            jump imm
        a "...!"
        jump tatsuyascene1
Please visit my projects Perios- Chained Sorceress
and Final Banquet now with demo!

And my blog for more updates!

Simulacro
Regular
Posts: 35
Joined: Tue Aug 03, 2010 9:38 am
Contact:

Re: Main Menu problems with imagemap

#7 Post by Simulacro » Fri Aug 06, 2010 6:14 pm

So you got to the main screen or not? If you got to a dead one at least one part it working. If the program didn't even run, maybe that's another things going on.

Post Reply

Who is online

Users browsing this forum: No registered users