Python: Change Main Menu Background Image

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

WildDragonFlying

Thread Starter
Joined
Oct 14, 2017
Messages
1
So, I am working on creating a visual novel using a game engine called Ren'py. This program uses Python to code, and so far I haven't really run into any issues that tinkering(with plenty of saving and judicious use of the 'undo' button) can't solve, but I can't figure out this.

Right now, I am attempting to change the background from the default(solid color image background, title text in another line of code that I can't pinpoint) to a custom one; the custom image will also have the name in it. Therefore, I want to change the background image and remove the code that puts the title text over the background image. I haven't been able to solve it myself, so I thought I'd post here. The image I want to use is located in:
C:\Users\Airenn Martlock\Downloads\renpy-6.99.12.4-sdk\renpy-6.99.12.4-sdk\Lane Manor\game\gui\background.png
Here's the code from the main menu section of the Screens editing thread/file/whatever-it's-called:
Code:
## Main Menu screen ############################################################
##
## Used to display the main menu when Ren'Py starts.
##
## http://www.renpy.org/doc/html/screen_special.html#main-menu

screen main_menu():

    ## This ensures that any other menu screen is replaced.
    tag menu

    style_prefix "main_menu"

    add gui.main_menu_background

    ## This empty frame darkens the main menu.
    frame:
        pass

    ## The use statement includes another screen inside this one. The actual
    ## contents of the main menu are in the navigation screen.
    use navigation

    if gui.show_name:

        vbox:
            text "[config.name!t]":
                style "main_menu_title"

            text "[config.version]":
                style "main_menu_version"


style main_menu_frame is empty
style main_menu_vbox is vbox
style main_menu_text is gui_text
style main_menu_title is main_menu_text
style main_menu_version is main_menu_text

style main_menu_frame:
    xsize 280
    yfill True

    background "gui/overlay/main_menu.png"

style main_menu_vbox:
    xalign 1.0
    xoffset -20
    xmaximum 800
    yalign 1.0
    yoffset -20

style main_menu_text:
    properties gui.text_properties("main_menu", accent=True)

style main_menu_title:
    properties gui.text_properties("title")

style main_menu_version:
    properties gui.text_properties("version")
(I've left in the comments because I just copied/pasted it directly from the screen, and the comments have been very helpful so far, though not so much in this case))

Any help would be much appreciated!
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top