.

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,810
24,391
I've created text buttons to appear on the main menu. However, when transitioning to the preferences menu, these buttons refuse to disappear, even though the title, subtitle and version do. I'd like these buttons to be removed when the "Preferences" or "Load" menu is opened.
You don't have permission to view the spoiler content. Log in or register now.

Thank you.
if the rest of screens.rpy is standard, the load() and preferences() screens still use the navigation() screen and therefore you have these entries at the left side
 

NamesRed

Member
Game Developer
May 13, 2018
198
133
if the rest of screens.rpy is standard, the load() and preferences() screens still use the navigation() screen and therefore you have these entries at the left side
How do I verify which is using the navigation screen? (aka how do I tell if navigation is being used in the main menu (note: var main_menu does not work for this).
 

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,810
24,391
How do I verify which is using the navigation screen? (aka how do I tell if navigation is being used in the main menu (note: var main_menu does not work for this).
eg. the preferences screen: use game_menu(_("Preferences"), scroll="viewport") <- you basically include the preferences screen into game_menu() via the transclude entry there
and in game_menu() there is the entry use navigation() <- this includes the navigation frame at the left side
i hope you understand what i mean, i'm really bad in explaining stuff :)
 
Nov 11, 2017
41
19
eg. the preferences screen: use game_menu(_("Preferences"), scroll="viewport") <- you basically include the preferences screen into game_menu() via the transclude entry there
and in game_menu() there is the entry use navigation() <- this includes the navigation frame at the left side
i hope you understand what i mean, i'm really bad in explaining stuff :)
I'm more wondering if I can tell from within the navigation screen if the navigation is being used by the main menu or the preferences menu.
 

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,810
24,391
I'm more wondering if I can tell from within the navigation screen if the navigation is being used by the main menu or the preferences menu.
pass the title var to the navigation screen
Code:
screen navigation(title=""):
    if main_menu:
        some code
    if title == "Preferences":
        some code

screen game_menu(title, scroll=None, yinitial=0.0):
    some code
    use navigation(title)
 

NamesRed

Member
Game Developer
May 13, 2018
198
133
T
pass the title var to the navigation screen
Code:
screen navigation(title=""):
    if main_menu:
        some code
    if title == "Preferences":
        some code

screen game_menu(title, scroll=None, yinitial=0.0):
    some code
    use navigation(title)
Thanks, that's exactly what I was looking for!
 

Honey hunters

Member
Jan 23, 2020
118
26
I'm new to renpy engine I want small help in script making I want make a Age verification code in Ren'Py script please help me to make a code in Ren'Py script Like { Yes I'm 18+ } goes to game and {No below 18 } is quit from game to home screen