Main menu Custom Imagemaps don't appear.

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
User avatar
AngelicBlood
Regular
Posts: 88
Joined: Wed Feb 06, 2013 11:08 am
Projects: House of Hearts
Location: Narnia
Contact:

Main menu Custom Imagemaps don't appear.

#1 Post by AngelicBlood »

So, one day lazy Angella decided to work on her game again.
She made some buttons(?) and asked for help. How does she-

...So, anyway, I made hover and an idle image. I used idle for the ground, too.

Here's the code I used:

Code: Select all

screen main_menu:
    tag menu
    # This ensures that any other menu screen is replaced.

    # The background of the main menu.
    window:
        style "mm_root"

    imagemap:
        ground "idlemenu.png"
        idle "idlemenu.png"
        hover "hovermenu.png"
       
        alpha False
        # This is so that everything transparent is invisible to the cursor.
       
        hotspot ((0, 479, 045, 002) action Start()
        hotspot (072, 483, 063, 93) action ShowMenu("load")
        hotspot (376, 492, 057, 99) action ShowMenu("preferences")
        hotspot (550, 480, 056, 007) action Quit(confirm=False)
       
init -2 python:
    # Make all the main menu buttons be the same size.
    style.mm_button.size_group = "mm"
I found the needed coordinations and wrote them down.
Yet again, when I play the game, they don't appear, and it's like I haven't changed anything.
The default buttons remain.
Am I missing out something?

User avatar
chewpower
Regular
Posts: 36
Joined: Mon Feb 11, 2013 11:08 pm
Contact:

Re: Main menu Custom Imagemaps don't appear.

#2 Post by chewpower »

Hum, that's weird..

Try to fix the double "((" in first hotspot. Furthermore, hotspot takes (x, y, width, height) as parameters, so you might also want to check that out. Last but not least, I think writing the numbers with zeroes in front of them is unnecessary, hence it should be "45" instead of "045", etc.

The window: style "mm_root" and init -2 phyton block are also unnecessary in my opinion :) I think?
I'm sorry if I'm too stupid, but I can't learn to walk on my own

User avatar
AngelicBlood
Regular
Posts: 88
Joined: Wed Feb 06, 2013 11:08 am
Projects: House of Hearts
Location: Narnia
Contact:

Re: Main menu Custom Imagemaps don't appear.

#3 Post by AngelicBlood »

chewpower wrote:Hum, that's weird..

Try to fix the double "((" in first hotspot. Furthermore, hotspot takes (x, y, width, height) as parameters, so you might also want to check that out. Last but not least, I think writing the numbers with zeroes in front of them is unnecessary, hence it should be "45" instead of "045", etc.

The window: style "mm_root" and init -2 phyton block are also unnecessary in my opinion :) I think?
Thank you for the advice!Though it still doesn't show up..

User avatar
netravelr
Miko-Class Veteran
Posts: 504
Joined: Thu Jan 28, 2010 2:31 am
Completed: Culina: Hands in the Kitchen, Culina: The Spirit of Cooking, Saving Zoey
Projects: Love at the Laundromat
Organization: Lakeview Interactive
Deviantart: netravelr
Location: USA
Contact:

Re: Main menu Custom Imagemaps don't appear.

#4 Post by netravelr »

I'm not so sure of the ATL way of doing hotspots, but using the renpy.imagemap, the first two hotspots are the upper left corner of the hotspot and the second two are the lower right corner. If that is true for ATL, then that would be why they aren't working. That and the (( should be (. Hope this helps!
Image
Technical Designer/Programmer
Game Design Portfolio - Project updates on my Twitter
Experienced in: C/C++/C#, Python, Unreal, Unity, and Flash
_________________
"Space can be very lonely. The greatest adventure is having someone share it with you."

apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: Main menu Custom Imagemaps don't appear.

#5 Post by apricotorange »

If you're still seeing the default main menu buttons, you probably left around a definition of "screen main_menu" in screens.rpy in your project. Delete it.

User avatar
AngelicBlood
Regular
Posts: 88
Joined: Wed Feb 06, 2013 11:08 am
Projects: House of Hearts
Location: Narnia
Contact:

Re: Main menu Custom Imagemaps don't appear.

#6 Post by AngelicBlood »

apricotorange wrote:If you're still seeing the default main menu buttons, you probably left around a definition of "screen main_menu" in screens.rpy in your project. Delete it.
Just did...same thing.. :I

Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

Re: Main menu Custom Imagemaps don't appear.

#7 Post by Ryue »

Did you also try to define the images for: selected_hover, selected_idle ?
(had a few similar probs with imagebutton when I didnt define all images that can exist)

User avatar
AngelicBlood
Regular
Posts: 88
Joined: Wed Feb 06, 2013 11:08 am
Projects: House of Hearts
Location: Narnia
Contact:

Re: Main menu Custom Imagemaps don't appear.

#8 Post by AngelicBlood »

Forgive me for that, but how do I do it?

Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

Re: Main menu Custom Imagemaps don't appear.

#9 Post by Ryue »

I think something like this (I'm more used to the python side of renpy....so could be that I'm doing it incorrect with this non python screen):

Code: Select all

screen main_menu:
    tag menu
    # This ensures that any other menu screen is replaced.

    # The background of the main menu.
    window:
        style "mm_root"

    imagemap:
        ground "idlemenu.png"
        idle "idlemenu.png"
        selected_idle "idlemenu.png"
        hover "hovermenu.png"
        selected_hover "hovermenu.png"       
        alpha False
        # This is so that everything transparent is invisible to the cursor.
       
        hotspot ((0, 479, 045, 002) action Start()
        hotspot (072, 483, 063, 93) action ShowMenu("load")
        hotspot (376, 492, 057, 99) action ShowMenu("preferences")
        hotspot (550, 480, 056, 007) action Quit(confirm=False)
       
init -2 python:
    # Make all the main menu buttons be the same size.
    style.mm_button.size_group = "mm"

User avatar
AngelicBlood
Regular
Posts: 88
Joined: Wed Feb 06, 2013 11:08 am
Projects: House of Hearts
Location: Narnia
Contact:

Re: Main menu Custom Imagemaps don't appear.

#10 Post by AngelicBlood »

Wolf wrote:I think something like this (I'm more used to the python side of renpy....so could be that I'm doing it incorrect with this non python screen):

Code: Select all

screen main_menu:
    tag menu
    # This ensures that any other menu screen is replaced.

    # The background of the main menu.
    window:
        style "mm_root"

    imagemap:
        ground "idlemenu.png"
        idle "idlemenu.png"
        selected_idle "idlemenu.png"
        hover "hovermenu.png"
        selected_hover "hovermenu.png"       
        alpha False
        # This is so that everything transparent is invisible to the cursor.
       
        hotspot ((0, 479, 045, 002) action Start()
        hotspot (072, 483, 063, 93) action ShowMenu("load")
        hotspot (376, 492, 057, 99) action ShowMenu("preferences")
        hotspot (550, 480, 056, 007) action Quit(confirm=False)
       
init -2 python:
    # Make all the main menu buttons be the same size.
    style.mm_button.size_group = "mm"
Thank you, but now I've encountered another problem. The Start button leads me to the Save option instead, the Preferences works nicely, but the rest of the buttons just won't work.

Post Reply

Who is online

Users browsing this forum: No registered users