I want to overlap my menus (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
beastcarving
Regular
Posts: 139
Joined: Mon May 13, 2019 5:03 pm
Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
Projects: Your Brother's Religion
Organization: BeastCarving Studio
IRC Nick: BeastCarving
Tumblr: beastcarving
Deviantart: beastcarving
Github: beastcarving
itch: beastcarving
Contact:

I want to overlap my menus (solved)

#1 Post by beastcarving » Thu Jan 09, 2020 10:29 pm

Code: Select all

    # This ensures that any other menu screen is replaced.
    tag menu
What do I write in order to overlap my menus?
I know simply easing "tag menu doesn't work"

So what I'm basically doing is showing two imagemaps at once one behind the other. One imagemap is like a small window and button, so I want the other imagemap to make up the background when the small map and button are showing. Right now the fullscreen image map is replaced with a black scree when I click to make the smaller imagemap show up. How do I fix this?

This is what I have so far:

Code: Select all

        call screen schoolbooks
        screen schoolbooks():
           
                imagemap:
                    ground "1.jpg"
                    hover "botton1.png"
                    idle "button2.png"
                    hotspot (31, 49, 480, 260) action ShowMenu ("schoolbook1")
#this is the fullscreen imagemap
Then I click on the hotspot to reveal the inside of the book.

Code: Select all

    label schoolbook1:
        
        call screen schoolbook1def
        screen schoolbook1def():
            imagemap:
                alpha True
                ground "blank.png"
                hover "bookinside1.png"
                idle "bookinside2.png"
                hotspot (613, 543, 99, 119) action ShowMenu ("schoolbook1go")
I'm stuck. :(
Last edited by beastcarving on Wed May 20, 2020 7:36 pm, edited 1 time in total.
Image Pulse Cage (full game)Image Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving

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

Re: I want to overlap my menus (help)

#2 Post by Alex » Fri Jan 10, 2020 11:56 am

You need to use Show-action rather than ShowMenu.
Also, if you call a screen, it must return something to end interaction (like, add a button with action Return() in the screen).

And you can set a list of actions for buttons/hotspots if needed, like

Code: Select all

textbutton "Click!" action [ Show("screen_2"), Hide("screen_1") ]
https://www.renpy.org/doc/html/screen_a ... nu-actions
https://www.renpy.org/doc/html/screen_actions.html#Show
https://www.renpy.org/doc/html/screen_actions.html#Hide
https://www.renpy.org/doc/html/screen_a ... tml#Return

Post Reply

Who is online

Users browsing this forum: No registered users