Return Button not showing after Opening "Help" 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
User avatar
SpagootBoi
Regular
Posts: 25
Joined: Sun Mar 22, 2020 12:02 am
Completed: Infatuation (Visual Novel Adaptation)
Projects: Canyonlands: American Folklore
Tumblr: plant324
itch: plantmama
Contact:

Return Button not showing after Opening "Help" Menu

#1 Post by SpagootBoi » Mon Jun 08, 2020 6:57 pm

I changed up my main menu so that my buttons were in the middle of the screen. I had a problem with making my "return" button display on the Help screen in my game. My attempt I made would cause the return button to move with the scrolling of the help menu. Is there anyway I can make it so the return button is off to the side.

Here's the return button code, I made it a button because it has a hover animation:

Code: Select all

button:
            xysize (304, 93)
            add "return_button"
            action Return()
Here the code that makes it so things like the start button don't display in other menus:

Code: Select all

if title!= "Load" and title!= "Save" and title!= "Settings" and title!= "Help":
        use navigation
Thanks to any help I get!
Image


User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Projects: The Button Man
Organization: NILA
Github: hell-oh-world
Location: Philippines
Contact:

Re: Return Button not showing after Opening "Help" Menu

#2 Post by hell_oh_world » Mon Jun 08, 2020 7:36 pm

Well, if you placed the return button inside the navigation screen it really wouldn't appear in your case since you made conditions inside the game_menu screen on when to use the navigation screen, what you can probably do is to add the return button at the very bottom of the navigation screen then make a condition for the buttons inside that screen and remove the condition that you made for the use navigation.

Code: Select all

screen navigation:
  # some codes...
  if not renpy.get_screen("help") and not renpy.get_screen("about"):           # add the conditions that would display the centered main menu buttons. In this case, the buttons will only appear when help or about screens aren't showing.
    if main_menu:
      vbox:
        align (0.5, 0.5)
      
        textbutton _("Start") action Start() align (0.5, 0.5)
      # other centered buttons...

  else:
    textbutton _("Return") action Return() align (0.75, 0.75) 

User avatar
SpagootBoi
Regular
Posts: 25
Joined: Sun Mar 22, 2020 12:02 am
Completed: Infatuation (Visual Novel Adaptation)
Projects: Canyonlands: American Folklore
Tumblr: plant324
itch: plantmama
Contact:

Re: Return Button not showing after Opening "Help" Menu

#3 Post by SpagootBoi » Tue Jun 09, 2020 12:30 am

I'd like to say the code worked, but it didn't really. I got the same result as last time. When I went into the help menu the return button still wouldn't show. Is there another solution? Is there maybe a way I can put the button in the actual screen? It worked with the Load feature, but for some reason, it doesn't work for settings or help. When I tried putting in the return button into the screen, as it wasn't working outside of the screen, it was constricted inside presets i think. Here's the code I used:

Code: Select all

use game_menu(_("Settings")):

        button:
            style_prefix "button"

            yalign 0.0
            xalign 0.0

            xysize (304, 93)
            add "return_button"
            action Return()


        vbox:
            hbox: #etc. etc.
Image


User avatar
SpagootBoi
Regular
Posts: 25
Joined: Sun Mar 22, 2020 12:02 am
Completed: Infatuation (Visual Novel Adaptation)
Projects: Canyonlands: American Folklore
Tumblr: plant324
itch: plantmama
Contact:

Re: Return Button not showing after Opening "Help" Menu

#4 Post by SpagootBoi » Tue Jun 09, 2020 4:58 pm

Nevermind, I figured out how to do this. Thanks for the help, though!
Image


Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]