Main Menu Image Map

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
animagic4u
Newbie
Posts: 24
Joined: Sat Jan 03, 2009 6:20 pm
Projects: Unbeatable Battles (Pre-Production)
Contact:

Main Menu Image Map

#1 Post by animagic4u »

I copied my Main Menu image map from a previous game where it was completely fine but now in my new game it's having problems. While no error in the code exists, when a player clicks on any menu option from the main screen and then returns to the main menu it is no longer the image map but the ren'py default.

Here's my code if it's important:

Code: Select all

init -2 python:
    layout.imagemap_main_menu("menu1.png", "menu2.png", [
        (210, 329, 555, 376, "Start Game"),
        (210, 400, 555, 450, "Load Game"),
        (270, 475, 493, 520, "Preferences"),
        (330, 551, 460, 590, "Quit"),
        ])

User avatar
Lumen_Astrum
Dystopian Princess
Posts: 1662
Joined: Mon Nov 08, 2010 8:01 am
Completed: Soul and Heart, Twin Faces
Projects: Soul and Heart Replay; The Court of the Two Sides (tentative title)
Organization: Lion Box Studios
Tumblr: lumenizampel
Location: Philippines
Contact:

Re: Main Menu Image Map

#2 Post by Lumen_Astrum »

I think you used the wrong code.
I used this code in my options tab...

Code: Select all

screen main_menu:
    tag menu

    imagemap:
        ground 'Menu.png'
        hover 'Menu_Hover.png'
        
        hotspot (354, 55, 540, 115) action Start()
        hotspot (354, 135, 540, 192) action ShowMenu('load')
        hotspot (354, 213, 580, 272) action ShowMenu('preferences')
        hotspot (354, 289, 540, 353) action Quit(confirm=False)
From this topic : http://lemmasoft.renai.us/forums/viewto ... 8470&hilit

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: Main Menu Image Map

#3 Post by Aleema »

It's not wrong, it's old. If you have the newest version of Ren'Py, you should edit your screens.rpy file. Or delete the main menu code from it or something.

Screen Language is what we're using now.

animagic4u
Newbie
Posts: 24
Joined: Sat Jan 03, 2009 6:20 pm
Projects: Unbeatable Battles (Pre-Production)
Contact:

Re: Main Menu Image Map

#4 Post by animagic4u »

No wonder. Thanks. I haven't used Ren'py in a while.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot]