centered character doesn't display text as centered

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
meiri
Regular
Posts: 177
Joined: Wed Jun 25, 2014 6:21 pm
Projects: Tutor Tabitha, Movement
Organization: Blue Bottlecap Games
Location: East Coast, US
Contact:

centered character doesn't display text as centered

#1 Post by meiri »

In my code, I have this

Code: Select all

scene black
with dissolve
centered "{color=#fff}Lunch Period{/color}"
However, the text displays in the bottom left corner of the screen. The textbox is still gone, but it's in the corner.
If you're wondering why I'm using the color text tag (as that could possibly the issue), it's because my default text is black, so it won't show on a black background.

Is there a reason this has happened, or at least a workaround to fix it?
What's in a loop? A loop iterated in any other way would output as sweet.
--
Have a look at my GxG kinetic novel, Movement, if you have the chance?

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: centered character doesn't display text as centered

#2 Post by xela »

Code: Select all

label start:
    scene black
    with dissolve
    centered "{color=#fff}Lunch Period{/color}"
Fresh project under 6.17. Text is being displayed at dead center. Are you sure you didn't go to some ridiculous length to redefine centered statement and forget?
Like what we're doing? Support us at:
Image

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: centered character doesn't display text as centered

#3 Post by Asceai »

Works for me.

Code: Select all

image black = '#000'

label start:
    scene black
    with dissolve
    centered "{color=#fff}Lunch Period{/color}"
    return
Must be something else in your game causing this. I'd be particularly suspicious of the custom text box, depending on how you implemented it.

EDIT: Huh, 'black' is a predefined image? That's handy to know. Thanks xela!

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: centered character doesn't display text as centered

#4 Post by xela »

(black's predefined in Ren'Py)

I didn't get the custom text box from the post, far more likely than redefining the centered statement.
Like what we're doing? Support us at:
Image

User avatar
meiri
Regular
Posts: 177
Joined: Wed Jun 25, 2014 6:21 pm
Projects: Tutor Tabitha, Movement
Organization: Blue Bottlecap Games
Location: East Coast, US
Contact:

Re: centered character doesn't display text as centered

#5 Post by meiri »

xela wrote:Are you sure you didn't go to some ridiculous length to redefine centered statement and forget?

Nope. Made sure to double check that.
xela wrote:I didn't get the custom text box from the post, far more likely than redefining the centered statement.
I do actually have a custom textbox, although I didnt mention that.

I decided to go back and check if I had made any changes to the Say screen recently.
Turns out, a while back when I made this thread, I changed "default two_window = True" to "$ two_window = True" . Setting it back to the former or changing the latter to false makes the text appear in the center again.

So I think I'm going to fix the two_window issue and try the other method mentioned in the aforementioned thread, which should in turn fix my centered text problem...
What's in a loop? A loop iterated in any other way would output as sweet.
--
Have a look at my GxG kinetic novel, Movement, if you have the chance?

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot], Toma