Centering Text in Namebox
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.
-
- Regular
- Posts: 32
- Joined: Mon Mar 08, 2010 11:16 pm
- Completed: Wolfram's Birthday Present
- Projects: BL Academy
- Contact:
Centering Text in Namebox
I was reading the cookbook but couldn't really understand how to create a separate window for my character names. I don't think any instructions were given...just that it was recommended. I don't know if I posted in the right place, but please help!
And thanks in advance! A picture has been attached to clear up what I want. (SOLVED but NEW PROBLEM DOWN BELOW!)
And thanks in advance! A picture has been attached to clear up what I want. (SOLVED but NEW PROBLEM DOWN BELOW!)
Last edited by serene-artist on Sun Jul 15, 2012 3:10 am, edited 2 times in total.
-
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: Creating a Namebox as a Separate File: Please help!
You have to put "show_two_window = True" when you define the character
Code: Select all
e = Character('Eileen'), show_two_window=True)
-
- Regular
- Posts: 32
- Joined: Mon Mar 08, 2010 11:16 pm
- Completed: Wolfram's Birthday Present
- Projects: BL Academy
- Contact:
Re: Creating a Namebox as a Separate File: Please help!
Thank you so much. No jokes, I was stuck on this for an hour (;n; )DragoonHP wrote:You have to put "show_two_window = True" when you define the character
Code: Select all
e = Character('Eileen'), show_two_window=True)
PLEASE except my gratitude!!! Thanks for answering so fast too! You are my savior \(0u0\)
-
- Regular
- Posts: 32
- Joined: Mon Mar 08, 2010 11:16 pm
- Completed: Wolfram's Birthday Present
- Projects: BL Academy
- Contact:
Re: Creating a Namebox as a Separate File: Please help!
A new problem has arrived
Sorry, does anyone know how to CENTER the name?
I tried using
style.say_who_window.xalign = 0.10 under options.rpy but it only moved the namebox rather than the font inside!!
Please and thanks in advance again!
Sorry, does anyone know how to CENTER the name?
I tried using
style.say_who_window.xalign = 0.10 under options.rpy but it only moved the namebox rather than the font inside!!
Please and thanks in advance again!
-
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: Centering Text in Namebox
Change
to
in the else block in screen.rpy under screen say.
Code: Select all
id "who"
Code: Select all
id "who" xalign .5
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
Re: Centering Text in Namebox
Huh, I tried this and it didn't change anything.DragoonHP wrote:ChangetoCode: Select all
id "who"
in the else block in screen.rpy under screen say.Code: Select all
id "who" xalign .5
-
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: Centering Text in Namebox
I just tried it and it works for me
Code: Select all
else:
# The two window variant.
vbox:
style "say_two_window_vbox"
if who:
window:
style "say_who_window"
text who:
id "who" xalign .5
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
-
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: Centering Text in Namebox
This is how my output looks
And it might be a silly question, but you are using the show_two_window variant right?
And it might be a silly question, but you are using the show_two_window variant right?
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
-
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: Centering Text in Namebox
(you aren't using the two_windows_variant, right?)
If yes, then
should work for you.
If it doesn't, then I have no idea where it is going wrong.
If yes, then
Code: Select all
background None
yoffset -10
xoffset 12
text who id "who" xalign .5
If it doesn't, then I have no idea where it is going wrong.
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
Re: Centering Text in Namebox
Yeah, it just made things all crazy like the screen cap above. It isn't that big of a deal, so I won't use it.
Thanks for trying.
Thanks for trying.
-
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: Centering Text in Namebox
Okay found out why it's not showing up correctly for you. (Because of frame; see the size of frame depends upon the space the text takes, so trying to center the text is all but futile in it.
So instead of trying to center (or reposition) the text, try to reposition the frame.
So instead of trying to center (or reposition) the text, try to reposition the frame.
Code: Select all
if who:
frame:
background None
yoffset -10
xoffset 12
xalign 0.5 ?# Change it to fit your needs
text who id "who"
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
Re: Centering Text in Namebox
Hmm...it is making the names jump around each time the screen changes.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], pockatuck