Imagemap in main menu

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
Dragon2l
Newbie
Posts: 3
Joined: Tue Jan 29, 2019 9:01 am
Contact:

Imagemap in main menu

#1 Post by Dragon2l »

Hey, I made a imagemap in main menu but I have this problem, the only buttons that works are "start" and "Quit". How to make that every hotspot works? and I want just the main menu as the image map the rest may be the same as when you create new project.
Thanks for help.

Code: Select all

screen navigation:
      
    imagemap:
        ground "menu/ground.png"
        hover "menu/hover.png"
        
        hotspot (426, 184, 368, 140) action Start()
        hotspot (269, 444, 312, 160) action ShowMenu("load")
        hotspot (908, 450, 310, 158) action ShowMenu("preferences")
        hotspot (21, 169, 321, 167)action Help()
        hotspot (940, 181, 317, 164) action Quit(confirm=False)
        
        if main_menu:

            textbutton _("Start") action Start()

        else:

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

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

        hotspot _("Load") action ShowMenu("load")

        textbutton _("Preferences") action ShowMenu("preferences")

        if _in_replay:

            textbutton _("End Replay") action EndReplay(confirm=True)

        elif not main_menu:

            textbutton _("Main Menu") action MainMenu()

        textbutton _("About") action ShowMenu("about")

        if renpy.variant("pc"):

            ## Help isn't necessary or relevant to mobile devices.
            textbutton _("Help") action ShowMenu("help")

            ## The quit button is banned on iOS and unnecessary on Android.
            textbutton _("Quit") action Quit(confirm=not main_menu)


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")

Post Reply

Who is online

Users browsing this forum: Google [Bot]