Help with Imagemap and Quickmenu

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
JustAlexander
Newbie
Posts: 19
Joined: Sun Mar 03, 2019 9:27 am
Contact:

Help with Imagemap and Quickmenu

#1 Post by JustAlexander » Mon Nov 11, 2019 9:04 am

I decided to try to make an imagemap menu for my game using This Tutorial, I followed every step, and my navigation screen code looks something like this:

Code: Select all

## Navigation screen ###########################################################
##
## This screen is included in the main and game menus, and provides navigation
## to other menus, and to start the game.

screen navigation():
    

    if main_menu:
        imagemap:
            
            idle "menuscreen_idle.jpg"
            hover "menuscreen_hover.jpg"
            ground "menuscreen_ground.jpg"
            
            hotspot (96, 198, 314, 122) action ShowMenu('start')
            hotspot (104, 367, 309, 124) action ShowMenu('load')
            hotspot (109, 540, 298, 116) action ShowMenu('awardsgallery')
            hotspot (107, 684, 302, 120) action Quit('quit')


    else:
            
        textbutton _("History") action ShowMenu("history")

        textbutton _("Save") action ShowMenu("save")
            

        

style navigation_button is gui_button
style navigation_button_text is gui_button_text

style navigation_button:
    size_group "navigation"
    properties gui.button_properties("navigation_button")

style navigation_button_text:
    properties gui.button_text_properties("navigation_button")

        
My problem is, every time I want to start a new, test game using this code the quick menu doesn't appear at all during the game.
I created a completely new project just to see if it wasn't something in the script, but no. I replaced only the menu navigation part, and it doesn't work. The quick menu doesn't appear nor I can activate with the right mouse button.
Could someone please tell me what's wrong? All my games that aren't using this code have quick menu.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 556
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1
Projects: Defenders of Adacan Part 2
Deviantart: pekj
itch: per-k-grok
Location: Sverige
Contact:

Re: Help with Imagemap and Quickmenu

#2 Post by Per K Grok » Mon Nov 11, 2019 1:56 pm

JustAlexander wrote:
Mon Nov 11, 2019 9:04 am
I decided to try to make an imagemap menu for my game using This Tutorial, I followed every step, and my navigation screen code looks something like this:

Code: Select all

## Navigation screen ###########################################################
##
## This screen is included in the main and game menus, and provides navigation
## to other menus, and to start the game.

screen navigation():
    

    if main_menu:
        imagemap:
            
            idle "menuscreen_idle.jpg"
            hover "menuscreen_hover.jpg"
            ground "menuscreen_ground.jpg"
            
            hotspot (96, 198, 314, 122) action ShowMenu('start')
            hotspot (104, 367, 309, 124) action ShowMenu('load')
            hotspot (109, 540, 298, 116) action ShowMenu('awardsgallery')
            hotspot (107, 684, 302, 120) action Quit('quit')


    else:
            
        textbutton _("History") action ShowMenu("history")

        textbutton _("Save") action ShowMenu("save")
            

        

style navigation_button is gui_button
style navigation_button_text is gui_button_text

style navigation_button:
    size_group "navigation"
    properties gui.button_properties("navigation_button")

style navigation_button_text:
    properties gui.button_text_properties("navigation_button")

        
My problem is, every time I want to start a new, test game using this code the quick menu doesn't appear at all during the game.
I created a completely new project just to see if it wasn't something in the script, but no. I replaced only the menu navigation part, and it doesn't work. The quick menu doesn't appear nor I can activate with the right mouse button.
Could someone please tell me what's wrong? All my games that aren't using this code have quick menu.
change
hotspot (96, 198, 314, 122) action ShowMenu('start')
to
hotspot (96, 198, 314, 122) action Start()
Image Visual Story Telling, DeviantArt Group for animations, comics, games and illustrations https://www.deviantart.com/acgi

JustAlexander
Newbie
Posts: 19
Joined: Sun Mar 03, 2019 9:27 am
Contact:

Re: Help with Imagemap and Quickmenu

#3 Post by JustAlexander » Mon Nov 11, 2019 2:50 pm

It works! Thank you!
I'm not sure how exactly it works (like, what is the difference between your version and mine), but thank you!

Post Reply

Who is online

Users browsing this forum: deltadidirac, Google [Bot]