How do I add a custom menu button without editing screens.rpy?

Sep 30, 2020
96
255
Is there to create a patch that will be universal for renpy games that would add a button to the main menu without editing screens.rpy file in the game?

I want to work on a mod, make it universal, and add a button to the main menu that would open options of the mod. This way I will not have to create custom "screens.rpy" files for each game.

thanks.
 

Danv

Well-Known Member
Aug 21, 2020
1,443
2,004
not sure about main menu, but adding universal ingame button is easy

Python:
screen my_custom_button():
    textbutton "My Button" action Show("my_menu") align(0,0) text_size gui.quick_button_text_size
    #adds button to top-left

screen my_menu():
    # your custom screen here as example

init 100 python:
    config.overlay_screens.append ("my_custom_button")

edit: actual relevant bit from my own universal mod
You don't have permission to view the spoiler content. Log in or register now.
 
Last edited:
  • Like
Reactions: James_Bond_007
Sep 30, 2020
96
255
not sure about main menu, but adding universal ingame button is easy

Python:
screen my_custom_button():
    textbutton "My Button" action Show("my_menu") align(0,0) text_size gui.quick_button_text_size
    #adds button to top-left

screen my_menu():
    # your custom screen here as example

init 100 python:
    config.overlay_screens.append ("my_custom_button")

edit: actual relevant bit from my own universal mod
You don't have permission to view the spoiler content. Log in or register now.
thanks.