Centered Text in NVL-Mode is centered incorrectly [SOLVED]

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
TheKiwi
Regular
Posts: 56
Joined: Sun Feb 03, 2013 4:09 am
Projects: The Waters Above, Heart of the Woods
Organization: Studio Élan
Tumblr: minutekiwi
Contact:

Centered Text in NVL-Mode is centered incorrectly [SOLVED]

#1 Post by TheKiwi »

Hi guys. I'm trying to use NVL mode in Ren'py, and I've more or less figured it out how I want it.
But I'm having an issue in terms of centering the text correctly. Here's a picture.
Image

Besides that, here's some relevant code I have that may help?

Code: Select all

init:
    $ s = Character(None, kind=nvl)
    $ cen = Character(None, kind=nvl, what_xalign=0.5, what_text_align=0.5)
s character works perfectly, but "cen" is... well, yeah.

Code: Select all

init python:
    style.nvl_vbox.box_spacing = 15
    style.nvl_window.xpadding = 90
    style.nvl_window.ypadding = 55
    style.nvl_say_vbox.xfill = True
    menu = nvl_menu
Everything else is at default settings.

Thanks in advance if anyone can help me out with this!
Last edited by TheKiwi on Wed Aug 05, 2015 10:41 am, edited 1 time in total.

User avatar
TheKiwi
Regular
Posts: 56
Joined: Sun Feb 03, 2013 4:09 am
Projects: The Waters Above, Heart of the Woods
Organization: Studio Élan
Tumblr: minutekiwi
Contact:

Re: Centered Text in NVL-Mode is centered incorrectly

#2 Post by TheKiwi »

Well, I'm about 99% sure I looked at every thread pertaining to this subject and I still haven't been able to figure out what seems to work for other people.

For example, I've added

Code: Select all

init:
    style nvl_vbox:
        xfill True
and

Code: Select all

init python:
    style.nvl_vbox.xfill = True
Neither work, but they were suggested problems for similar issues. Sorry for rebumping!

User avatar
orz
Regular
Posts: 126
Joined: Tue Apr 21, 2015 10:19 pm
Contact:

Re: Centered Text in NVL-Mode is centered incorrectly

#3 Post by orz »

What's the least amount of code in which you can replicate the problem?

(Half the time, in getting to that step I figure out my own problem anyway. The other half just makes it a lot easier for the people helping to help.)

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Centered Text in NVL-Mode is centered incorrectly

#4 Post by trooper6 »

This works for me:

Code: Select all

define narrator = Character(None, kind=nvl, what_xalign=0.5, window_xalign=0.5, what_italic=True)

init:
    style nvl_vbox:
        xfill True
    
label start:
    "As you enter the bar you see shady people."
    "You call out to the bartender."
    "He turns to you."
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
TheKiwi
Regular
Posts: 56
Joined: Sun Feb 03, 2013 4:09 am
Projects: The Waters Above, Heart of the Woods
Organization: Studio Élan
Tumblr: minutekiwi
Contact:

Re: Centered Text in NVL-Mode is centered incorrectly

#5 Post by TheKiwi »

Hi! Thanks a lot for the replies.

Trooper6's reply works perfectly! My only issue was that it wasn't working well in my original, so I had to make a new project. After that it was fine! Thank you guys so much.

Post Reply

Who is online

Users browsing this forum: henne, Semrush [Bot]