[Question]Center Character Name

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
Vamides
Regular
Posts: 26
Joined: Sun Sep 07, 2008 3:34 pm
Location: Under the shadow of the world's tree.
Contact:

[Question]Center Character Name

#1 Post by Vamides »

I tried the Search stuff and looking at the demo, but well...

Anyways, I'm trying to center the name of the characters in the small block when I use "show_two_window=True"

Check the pic.

CLICK

It is possible? Thanks in advance.

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Question]Center Character Name

#2 Post by Aleema »

You can add "who_xalign=0.5" to the end of characters:

Code: Select all

$ s = Character('Sylvia', color="#c8ffc8", show_two_window=True, who_xalign=0.5, who_yalign=0.5)
You can also arrange the who_window by modifying the "say_who_window" style:

Code: Select all

    style.say_who_window.background = Frame("frame2.png", 9, 9)

    style.say_who_window.left_margin = 15
    style.say_who_window.right_margin = 15
    style.say_who_window.top_margin = 5
    style.say_who_window.bottom_margin = 5

    style.say_who_window.left_padding = 5
    style.say_who_window.right_padding = 5
    style.say_who_window.top_padding = 5
    style.say_who_window.bottom_padding =5

User avatar
Vamides
Regular
Posts: 26
Joined: Sun Sep 07, 2008 3:34 pm
Location: Under the shadow of the world's tree.
Contact:

Re: [Question]Center Character Name

#3 Post by Vamides »

Oho... the centered names works like a charm, thank you.

I'm going to try now the style thing... I've been wondering how to make decent frames.

Thanks again.

Post Reply

Who is online

Users browsing this forum: Sugar_and_rice