Change Position of Main Menu Title Name Text

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
AJFLink
Newbie
Posts: 16
Joined: Mon Nov 05, 2018 2:04 am
Contact:

Change Position of Main Menu Title Name Text

#1 Post 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?

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

Re: Change Position of Main Menu Title Name Text

#2 Post 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.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

AJFLink
Newbie
Posts: 16
Joined: Mon Nov 05, 2018 2:04 am
Contact:

Re: Change Position of Main Menu Title Name Text

#3 Post 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.

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

Re: Change Position of Main Menu Title Name Text

#4 Post 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"
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

AJFLink
Newbie
Posts: 16
Joined: Mon Nov 05, 2018 2:04 am
Contact:

Re: Change Position of Main Menu Title Name Text

#5 Post 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.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]