[solved] How can I "center" this 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
User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

[solved] How can I "center" this text?

#1 Post by Nanahs »

This is the code:

Code: Select all

    "Where will she travel to?"
    $ answer1 = renpy.random.choice(["Paris", "London", "New York"])
    "She will travel to [answer1]."
I want both texts the be shown in the center of the screen.
But I don't know which type of code is the right one on this case.

Thanks :)
Last edited by Nanahs on Tue Oct 16, 2018 9:21 am, edited 2 times in total.

DannX
Regular
Posts: 99
Joined: Mon Mar 12, 2018 11:15 am
Contact:

Re: How can I "center" this text?

#2 Post by DannX »

Use the centered special character:

Code: Select all

centered "Where will she travel to?"
That will show it without any window. If you want to show the window and the text, you can instead give it an argument like this:

Code: Select all

"Where will she travel to?" (window_yalign=.5)

User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: How can I "center" this text?

#3 Post by Nanahs »

DannX wrote: Mon Oct 15, 2018 11:47 am Use the centered special character:

Code: Select all

centered "Where will she travel to?"
That will show it without any window. If you want to show the window and the text, you can instead give it an argument like this:

Code: Select all

"Where will she travel to?" (window_yalign=.5)
Thank you so much! :)

Post Reply

Who is online

Users browsing this forum: No registered users