Change the about screen background [solved]

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
kahmehkahzeh
Regular
Posts: 62
Joined: Thu Apr 13, 2017 6:47 am
Contact:

Change the about screen background [solved]

#1 Post by kahmehkahzeh » Tue Apr 25, 2017 8:45 am

So I am almost complete with my project I just am looking for a way to change the about screen to have its own background image. but it just keeps using the main menu image instead.

Some of you may know how much I have destroyed this programs code, just looking for a nudge in the right direction to replacing it.

Thank you all again for your help.
Last edited by kahmehkahzeh on Thu Apr 27, 2017 3:01 am, edited 1 time in total.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2983
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Change the about screen background

#2 Post by Imperf3kt » Tue Apr 25, 2017 12:31 pm

Code: Select all


add gui.main_menu_background
Change this to an image you want.
Note, the overlay menu will still show (the half transparent bar on the left)
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

kahmehkahzeh
Regular
Posts: 62
Joined: Thu Apr 13, 2017 6:47 am
Contact:

Re: Change the about screen background

#3 Post by kahmehkahzeh » Wed Apr 26, 2017 1:27 am

okay I have a main menu image and a game menu issue, but no matter what I try from the MAIN menu when I click about it keeps the main menu image and no matter what I try does not change.

I even tried this

Code: Select all

add gui.game_menu_background

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Change the about screen background

#4 Post by Divona » Wed Apr 26, 2017 7:42 am

The about screen is still part of "game menu", therefore it using the game menu background for this. You have to adjust that in "screen game_menu()" under "screens.rpy"

Code: Select all

screen game_menu(title, scroll=None):

    style_prefix "game_menu"

    if main_menu:
        add gui.main_menu_background
    ## Add these lines ###################
    elif renpy.get_screen("about"):
        add "my_custom_background.png"
    ######################################
    else:
        add gui.game_menu_background

    . . .
Completed:
Image

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2983
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Change the about screen background

#5 Post by Imperf3kt » Thu Apr 27, 2017 12:11 am

kahmehkahzeh wrote:okay I have a main menu image and a game menu issue, but no matter what I try from the MAIN menu when I click about it keeps the main menu image and no matter what I try does not change.

I even tried this

Code: Select all

add gui.game_menu_background
Whoops, I left out some details and made a mistake. It was 3:30am and that's my excuse :P.

Anyway, follow Divona's advice.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

kahmehkahzeh
Regular
Posts: 62
Joined: Thu Apr 13, 2017 6:47 am
Contact:

Re: Change the about screen background

#6 Post by kahmehkahzeh » Thu Apr 27, 2017 3:01 am

Before you posted this I did something and it works... but your method also worked on a dummy project thank you!

Post Reply

Who is online

Users browsing this forum: Karrion, Shocking Alberto