Ren'Py Reposition title on title screen

Harkonnan

Give me chiisana oppai!
Game Developer
Oct 24, 2020
200
333
I've been looking through the gui.rpy and screens.rpy and even checked online documentation and can't seem to find where or how to move the title. By default it's placed in the bottom right corner. I would like to move it to the top right corner. I would greatly appreciate if someone could tell me where or how to accomplish this. Also I was wondering if the version number would move with it automatically or if I would need to move that as well. If I need to move this as well I would like to know where and how to do this as well.

Thanks in advance for any help.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,971
16,229
I've been looking through the gui.rpy and screens.rpy and even checked online documentation and can't seem to find where or how to move the title.
In screens.rpy, there's a screen named "main_menu" :

Python:
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"
The line style_prefix "main_menu" inform you that the style used for this screen starts by "main_menu". As for the end of the screen definition, it's where the title is displayed, and as you can see, it's done through a vbox. It also show that the version is part of the vbox and so will move with the title.

Therefore, search for the style named "main_menu_vbox" and change it accordingly to the position you want for the title.

By example, if you want it centered on top of the screen, but not stuck to the border, the style need to looks like this :
Python:
style main_menu_vbox:
    xalign 0.0   # Was 1.0
    xoffset 30   # Was -30
    xmaximum 1200
    yalign 0.0  # Was 1.0
#    yoffset -30   # Not needed
 
  • Like
Reactions: Harkonnan