Simple imagemap screen? [Solved]

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
Boniae
Regular
Posts: 187
Joined: Fri Apr 10, 2009 4:10 pm
Completed: I want 2 be single and Forget-Me-Not
Projects: Cry Girlhood, Dakota Wanderers, Sagebrush
Organization: Rosewater Games
Tumblr: boniae
Location: Cleveland, OH
Contact:

Simple imagemap screen? [Solved]

#1 Post by Boniae »

I'm having trouble trying to make an extras page that will jump to my game's music room, CG gallery, and a back button. I've already made a screen called "extras_page" but I can't seem to figure out how to jump to the pages I want? Do I make an imagemap and replace the file names with the labels of my galleries...? Or is there something special I have to do because it's a screen page?

Sorry if I didn't describe it well, but it'd be great if I could get some help on this. :)
Last edited by Boniae on Sat Oct 05, 2013 1:37 pm, edited 1 time in total.

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Simple imagemap screen?

#2 Post by Alex »

If you already have a CG and MusicRoom screens, then in your extras screen you could make buttons or set imagemap's hotspots to show these screens. Like

Code: Select all

screen main_menu:

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

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

    # The main menu buttons.
    frame:
        style_group "mm"
        xalign .98
        yalign .98

        has vbox

        textbutton _("Start Game") action Start()
        textbutton _("Load Game") action ShowMenu("load")
        textbutton _("Preferences") action ShowMenu("preferences")

        textbutton _("Extras") action ShowMenu("extras_page")

        textbutton _("Help") action Help()
        textbutton _("Quit") action Quit(confirm=False)

screen extras_page:
    tag menu     # to replace the main menu screen
    vbox:
        textbutton "Gallery" action ShowMenu("gallery")   # your gallery screen should have <tag menu> to replace the extras_page
        textbutton "Return" action Return()
And in your CG and MR screens you also need to change the return buttons action - they should show the extras_page instead

Code: Select all

textbutton "Return" action ShowMenu("extras_page")

User avatar
Boniae
Regular
Posts: 187
Joined: Fri Apr 10, 2009 4:10 pm
Completed: I want 2 be single and Forget-Me-Not
Projects: Cry Girlhood, Dakota Wanderers, Sagebrush
Organization: Rosewater Games
Tumblr: boniae
Location: Cleveland, OH
Contact:

Re: Simple imagemap screen?

#3 Post by Boniae »

Ahhhhhh thank you so much Alex! It works! :mrgreen:

Post Reply

Who is online

Users browsing this forum: No registered users