Button that displays on the title screen only

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
expenseroso
Regular
Posts: 28
Joined: Tue Mar 14, 2017 7:15 pm
Contact:

Button that displays on the title screen only

#1 Post by expenseroso »

I'm trying to add a button that links to my web site on the title screen. Right now in screens.rpy I have:

Code: Select all

screen navigation():
    if main_menu:
        imagebutton:
            yalign 0.7
            xalign 0.95
            idle "website_idle.png"
            hover "website_hover.png"
This works fine for the title screen, however the button also shows up in all other screens accessed from the title screen(load, preferences, etc). How would I go about making it visible on the title screen only?

User avatar
SuperbowserX
Veteran
Posts: 270
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

Re: Button that displays on the title screen only

#2 Post by SuperbowserX »

Once the title screen shows, run the following line of code:

Code: Select all

show screen navigation
Than, ANYTIME the user does something to take them out of the title screen, run this line of code:

Code: Select all

hide screen navigation

Post Reply

Who is online

Users browsing this forum: Google [Bot]