Page 1 of 1

Question for bad ass problem-solvers: Different bgs in Main_Menu

Posted: Thu Sep 16, 2021 4:01 am
by alexei
hey peeps, question for bad ass problem-solvers:

I have the following main_menu

Image

what I want to do when I click (let's say) the settings, is to default to the bg / screen I have for the game_menu

Image


but right now I get the bg from the Main_Menu

Image

how can I have the desired bg?

Re: Question for bad ass problem-solvers: Different bgs in Main_Menu

Posted: Thu Sep 16, 2021 7:21 am
by Alex
Check gui.rpy for this lines

Code: Select all

## Main and Game Menus #########################################################

## The images used for the main and game menus.
define gui.main_menu_background = "gui/main_menu.png"
define gui.game_menu_background = "gui/game_menu.png"
and set game menu bg to desirable image.

There should be this lines in game_menu screen that will use apropriate bg image

Code: Select all

screen game_menu(title, scroll=None, yinitial=0.0):

    style_prefix "game_menu"

    if main_menu:
        add gui.main_menu_background
    else:
        add gui.game_menu_background

Re: Question for bad ass problem-solvers: Different bgs in Main_Menu

Posted: Thu Sep 16, 2021 12:00 pm
by alexei
Alex wrote: Thu Sep 16, 2021 7:21 am Check gui.rpy for this lines

Code: Select all

## Main and Game Menus #########################################################

## The images used for the main and game menus.
define gui.main_menu_background = "gui/main_menu.png"
define gui.game_menu_background = "gui/game_menu.png"
and set game menu bg to desirable image.

There should be this lines in game_menu screen that will use apropriate bg image

Code: Select all

screen game_menu(title, scroll=None, yinitial=0.0):

    style_prefix "game_menu"

    if main_menu:
        add gui.main_menu_background
    else:
        add gui.game_menu_background
that's not what I asked.

Re: Question for bad ass problem-solvers: Different bgs in Main_Menu

Posted: Thu Sep 16, 2021 12:01 pm
by alexei
I found the solution.

so, that's what I had to do.

Code: Select all

screen game_menu(title, scroll=None, yinitial=0.0):

    style_prefix "game_menu"

    if renpy.get_screen("main_menu"):
        add gui.main_menu_background
    elif renpy.get_screen('history') or renpy.get_screen('about'):
        add "gui/historybg.png"
    elif renpy.get_screen('preferences'):
        add "gui/settingsbg.png"
    else:
        add gui.game_menu_background