(SOLVED) Aligning Names in Namebox

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
RoboKnight
Newbie
Posts: 19
Joined: Sun Feb 18, 2018 6:12 pm
Contact:

(SOLVED) Aligning Names in Namebox

#1 Post by RoboKnight »

Hello,
I've been having a spot of trouble with my characters' names. I know I can change the x and y axis of where I may place my names in the Namebox, but they seem to be anchored to the center. As in, a longer name will always appear farther left and right than a shorter name.
I would like to have the first letter of names anchored, so that they will only expand to the right if the names get longer.

Thank you for your time.
Last edited by RoboKnight on Sun Feb 18, 2018 11:57 pm, edited 1 time in total.

User avatar
warmsundae
Regular
Posts: 61
Joined: Tue Feb 24, 2015 9:51 pm
Skype: electriclan
Soundcloud: lanterny
Location: korea
Contact:

Re: Aligning Names in Namebox

#2 Post by warmsundae »

have you tried changing the xalign to 0.0? you can implement it just as you would xpos and ypos.

irredeemable
Regular
Posts: 78
Joined: Thu Feb 08, 2018 7:57 am
Contact:

Re: Aligning Names in Namebox

#3 Post by irredeemable »

In my experience the names are left aligned. Have you changed the say screen at all?

RoboKnight
Newbie
Posts: 19
Joined: Sun Feb 18, 2018 6:12 pm
Contact:

Re: Aligning Names in Namebox

#4 Post by RoboKnight »

If I change the Xalign to 0.0, then the names stick out of the Namebox (it is diamond shaped)

User avatar
Draziya
Regular
Posts: 70
Joined: Sun Nov 26, 2017 8:50 am
Completed: this was for you. [NaNoRenO 19], Acetylene [AceJam19], Ah!! My Roommate is a Succubus Hellbent on World [MonJam 18], I Don't Have A Clue [QRMJam 18], Cautionary Tale [NaNoRenO 18], OP Dodge Cross [GGJ 18], Acetone [AceJam 18]
Projects: I'm a love interest in my childhood friend's reverse harem!!
Organization: Watercress
itch: Drazillion
Contact:

Re: Aligning Names in Namebox

#5 Post by Draziya »

I'm a bit confused. Couldn't you then use xpos and ypos to move the now left aligned names until they fit into the Namebox?
Image

RoboKnight
Newbie
Posts: 19
Joined: Sun Feb 18, 2018 6:12 pm
Contact:

Re: Aligning Names in Namebox

#6 Post by RoboKnight »

Draziya wrote: Sun Feb 18, 2018 10:15 pm I'm a bit confused. Couldn't you then use xpos and ypos to move the now left aligned names until they fit into the Namebox?
If I do that, then both the Namebox and name move across the screen.

User avatar
LateWhiteRabbit
Eileen-Class Veteran
Posts: 1867
Joined: Sat Jan 19, 2008 2:47 pm
Projects: The Space Between
Contact:

Re: Aligning Names in Namebox

#7 Post by LateWhiteRabbit »

You can always align the names to the namebox individually when you define the character. For instance:

Code: Select all

define b = Character("Bob", namebox_xalign=0.74)
Just experiment and set the namebox_xalign value to whatever works best for the character's name.

RoboKnight
Newbie
Posts: 19
Joined: Sun Feb 18, 2018 6:12 pm
Contact:

Re: Aligning Names in Namebox

#8 Post by RoboKnight »

LateWhiteRabbit wrote: Sun Feb 18, 2018 11:35 pm You can always align the names to the namebox individually when you define the character. For instance:

Code: Select all

define b = Character("Bob", namebox_xalign=0.74)
Just experiment and set the namebox_xalign value to whatever works best for the character's name.
Oh I didn't know you could do that. Thank you for the help!

Post Reply

Who is online

Users browsing this forum: Bing [Bot]