I'm trying to figure out whether or not it's possible to center the player's name in the Who box. Ordinarily, I'd just find the exact x-coordinates, but there are a few dynamic characters that rely on user input for their names, so the lengths will more often than not be different from the default.
Any help would be much appreciated!
Centering Who Text
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.
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.
- Zeekee
- Regular
- Posts: 67
- Joined: Wed Jul 23, 2014 10:17 pm
- Projects: No One But You, The Anomaly
- Organization: Annexe Interactive
- Skype: ytmnd111
- Soundcloud: zomgaarh
- Location: USAF Academy, CO
- Contact:
Centering Who Text
"When people sometimes misquote me, I don't know if they understand what I'm saying."
-Tommy Wiseau
-Tommy Wiseau
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Centering Who Text
Are you using the new GUI?
in gui.rpy, find these lines and edit them (you want to create a new yalign property)
After you add a yalign, make sure the namebox uses the property.
You may need to copy some code from a 00file in your renpy directory.
in gui.rpy, find these lines and edit them (you want to create a new yalign property)
Code: Select all
## The horizontal alignment of the character's name. This can be 0.0 for left-
## aligned, 0.5 for centered, and 1.0 for right-aligned.
define gui.name_xalign = 0.0
You may need to copy some code from a 00file in your renpy directory.
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
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- Zeekee
- Regular
- Posts: 67
- Joined: Wed Jul 23, 2014 10:17 pm
- Projects: No One But You, The Anomaly
- Organization: Annexe Interactive
- Skype: ytmnd111
- Soundcloud: zomgaarh
- Location: USAF Academy, CO
- Contact:
Re: Centering Who Text
Unfortunately, I'm not using the new GUI.
"When people sometimes misquote me, I don't know if they understand what I'm saying."
-Tommy Wiseau
-Tommy Wiseau
- Belgerum
- Regular
- Posts: 110
- Joined: Thu Nov 06, 2014 12:24 am
- Skype: belgerum09
- Soundcloud: Belgerum
- itch: Belgerum
- Contact:
Re: Centering Who Text
You'll want to find the "Say" screen, usually near the top of screens.rpy, and modify the text fields for the namebox to have xalign 0.5
For example, take the following:
And add an xalign statement:
You may also want to add it into the section below that, if you're using the two window variant.
For example, take the following:
Code: Select all
if who:
text who id "who"
Code: Select all
if who:
text who id "who" xalign 0.5
Code: Select all
if who:
window:
style "say_who_window"
text who:
id "who" xalign 0.5
Who is online
Users browsing this forum: No registered users