Page 1 of 1

Change Position of Main Menu Title Name Text

Posted: Mon Nov 05, 2018 2:44 am
by AJFLink
I would like to change the position of my game's title text position; however, I am unsure of how to do this. Can someone give me an example of how you would do so?

Re: Change Position of Main Menu Title Name Text

Posted: Mon Nov 05, 2018 2:55 am
by Imperf3kt
Which version of renpy are you using? If you have a gui.rpy file, that contains all the positioning for the main menu.

Re: Change Position of Main Menu Title Name Text

Posted: Mon Nov 05, 2018 10:40 am
by AJFLink
Imperf3kt wrote: Mon Nov 05, 2018 2:55 am Which version of renpy are you using? If you have a gui.rpy file, that contains all the positioning for the main menu.
The only one that I am seeing is the one for size in the gui.rpy file.

Code: Select all

define gui.title_text_size = 55
The version of Ren'Py that I am using is 6.99.12.4. Yes, I know it is outdated considering the release of 7; however, due to how my game is designed, updating the version of Ren'Py messing up some of the scripted displays for text and dialogue (especially NVL). I may be improperly updating the game with Ren'Py or doing something entirely wrong with the process.

Anyways, that is not important. I assume in the newer version in gui.rpy there is more in the file than my version in terms of customizing the position of where the game's title for the main menu. Or am I simply being idiotic and the customization for the title text is labeled something other than "gui.title_something_something"? However, I am not seeing it in the tutorial's gui.rpy file. It only has the same option to change the size of the title's text in the main menu.

Re: Change Position of Main Menu Title Name Text

Posted: Mon Nov 05, 2018 2:29 pm
by Imperf3kt
Oops, sorry, I had you looking in the wrong spot.

Open screens.rpy and find these lines

Code: Select all

style main_menu_vbox:
    xalign 1.0
    xoffset -30
    xmaximum 1200
    yalign 1.0
    yoffset -30

style main_menu_text:
    xalign 1.0

    layout "subtitle"
    text_align 1.0
    color gui.accent_color

style main_menu_title:
    size gui.title_text_size
They should be around line 397

These are what affect the placement of things.

What I did in one project, was just add some positioning information to the vbox

Code: Select all

if gui.show_name:
        vbox:
            xalign 0.97
            yalign 0.04
            
            if not renpy.variant("android"):
#            if not renpy.variant("small"):
                text "Welcome, [player]":
                    style "main_menu_version"
            else:
                null height 2
                
            text "[config.name!t]":
                style "main_menu_title"

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

Re: Change Position of Main Menu Title Name Text

Posted: Mon Nov 05, 2018 7:15 pm
by AJFLink
Imperf3kt wrote: Mon Nov 05, 2018 2:29 pm Oops, sorry, I had you looking in the wrong spot.

Open screens.rpy and find these lines

Code: Select all

style main_menu_vbox:
    xalign 1.0
    xoffset -30
    xmaximum 1200
    yalign 1.0
    yoffset -30

style main_menu_text:
    xalign 1.0

    layout "subtitle"
    text_align 1.0
    color gui.accent_color

style main_menu_title:
    size gui.title_text_size
They should be around line 397

These are what affect the placement of things.

What I did in one project, was just add some positioning information to the vbox

Code: Select all

if gui.show_name:
        vbox:
            xalign 0.97
            yalign 0.04
            
            if not renpy.variant("android"):
#            if not renpy.variant("small"):
                text "Welcome, [player]":
                    style "main_menu_version"
            else:
                null height 2
                
            text "[config.name!t]":
                style "main_menu_title"

            text "Version [config.version]":
                style "main_menu_version"
I forgot about those settings. Thanks for that.