Ren'Py Buttons "Help" and "About"

Jul 16, 2018
101
49
86
Hello, I use this code for the main menu. How can I add "Help" and "About"?
Code:
screen main_menu:
    tag menu
    imagemap:
        ground 'gui/main_menu_idle.png'
        hover 'gui/main_menu_hover.png'
        hotspot (........) action Start('start')
        hotspot (........) action ShowMenu('load')
        hotspot (........) action ShowMenu('preferences')
        hotspot (........) action Quit(confirm=False)
Other buttons work and before this code I deleted the basic code in screens.rpy :unsure:
 
Jul 16, 2018
101
49
86
v7.3.5 has something like that:
Code:
        hotspot (........) action ShowMenu("about")

        if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):

            ## Help isn't necessary or relevant to mobile devices.
            hotspot (........) action ShowMenu("help")
Oh, and if you still have the SDK, there should be a copy of screens.rpy inside "the_question\game" and "tutorial\game"
I'm sorry but what is SDK?
 
Jul 16, 2018
101
49
86
As I understand it, I did everything right but probably "About" and "Help" don't have any information inside. So where should I write "something"(text or something other) that will be inside these buttons

If I didn’t explain it clearly to you, then I can show it on the code:

Code:
style choice_button_text is default:
    properties gui.button_text_properties("choice_button")
   
    I deleted all code and wrote my code with imagemap and hotspots
   
screen confirm(message, yes_action, no_action):

    ## Ensure other screens do not get input while this screen is displayed.
    modal True

    zorder 200

    style_prefix "confirm"
 
Last edited:

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,658
2,350
462
I'm sorry but what is SDK?
What he means is the software developers kit.

When you download the core RenPy package (the RenPy Launcher), that is the SDK. It includes two example projects. "Tutorial" and the "The Question". Both can treated as basic examples of what to do.

[...] How can I add "Help" and "About"?
"The Question" is probably the simpler of the two to use as an example... so if you look at its screens.rpy, it includes...

You don't have permission to view the spoiler content. Log in or register now.

In there, you'll see things that could be applied to your code too. Specifically action ShowMenu("about") and action ShowMenu("help"). But as scrumbles has highlighted, the "default UI" does some extra checks to hide the help menu on mobile devices (in the same way that Android and iOS apps are not supposed to include a "Quit" button either). Of course, that's up to you.

But (baring other considerations) I'd expect your code to end up looking something like...

Python:
screen main_menu:
    tag menu
    imagemap:
        ground 'gui/main_menu_idle.png'
        hover 'gui/main_menu_hover.png'
        hotspot (........) action Start('start')
        hotspot (........) action ShowMenu('load')
        hotspot (........) action ShowMenu('preferences')
        hotspot (........) action ShowMenu('about')
        if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
            hotspot (........) action ShowMenu('help')
        if renpy.variant("pc"):
            hotspot (........) action Quit(confirm=False)
You will then of course also need the corresponding screen about(): and screen help(): code.
 
  • Like
Reactions: Conniver's Kunai
Jul 16, 2018
101
49
86
The software development kit. The one you have, I guess, downloaded from the .

"About" and "Help" screens are defined inside screens.rpy. The attached file is the copy included in the SDK v7.3.5 (path: gui\game\screens.rpy). Just search for ## Help screen and ## About screen.
What he means is the software developers kit.

When you download the core RenPy package (the RenPy Launcher), that is the SDK. It includes two example projects. "Tutorial" and the "The Question". Both can treated as basic examples of what to do.



"The Question" is probably the simpler of the two to use as an example... so if you look at its screens.rpy, it includes...

You don't have permission to view the spoiler content. Log in or register now.

In there, you'll see things that could be applied to your code too. Specifically action ShowMenu("about") and action ShowMenu("help"). But as scrumbles has highlighted, the "default UI" does some extra checks to hide the help menu on mobile devices (in the same way that Android and iOS apps are not supposed to include a "Quit" button either). Of course, that's up to you.

But (baring other considerations) I'd expect your code to end up looking something like...

Python:
screen main_menu:
    tag menu
    imagemap:
        ground 'gui/main_menu_idle.png'
        hover 'gui/main_menu_hover.png'
        hotspot (........) action Start('start')
        hotspot (........) action ShowMenu('load')
        hotspot (........) action ShowMenu('preferences')
        hotspot (........) action ShowMenu('about')
        if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
            hotspot (........) action ShowMenu('help')
        if renpy.variant("pc"):
            hotspot (........) action Quit(confirm=False)
You will then of course also need the corresponding screen about(): and screen help(): code.
Thank you!
 
  • Like
Reactions: scrumbles