Say Text Window Has Inconsistent Width

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
majike
Newbie
Posts: 21
Joined: Thu Feb 04, 2016 4:28 am
Contact:

Say Text Window Has Inconsistent Width

#1 Post by majike » Tue Oct 16, 2018 6:40 pm

I seem to have encountered a rather vexing situation. As attachments V1 and V2 show, I have carefully designed the say window for text to be positioned exactly 12 pixels (using integers) from each of the internal borders. However, if there is too much text (as V3 shows), the right side of the text ends up extending almost to the edge of the right border.

V1.png
(8.63 KiB) Not downloaded yet
V2.png
V3.png

I've tried extending window sizes, turning off Justify, adding margins, but nothing I do seems to work and it is starting to leave me really disheartened. Below is what I believe to be the relevant code. If anyone is able to solve this dilemma, I will be eternally grateful. <3

#########################################
## These settings let you customize the window containing the
## dialogue and narration, by replacing it with an image.

## The background of the window. In a Frame, the two numbers
## are the size of the left/right and top/bottom borders,
## respectively.

style.window.background = Frame("transparent.png", 0, 0)

## Margin is space surrounding the window, where the background
## is not drawn.

style.window.left_margin = 0
style.window.right_margin = 0
style.window.top_margin = 0
style.window.bottom_margin = 0

## Padding is space inside the window, where the background is
## drawn.

style.window.left_padding = 0
style.window.right_padding = 0
style.window.top_padding = 0
style.window.bottom_padding = 0

## This is the minimum height of the window, including the margins
## and padding.

style.window.xpos = 0.235
style.window.ypos = 0.136
style.window.xsize = 0.62
style.window.ysize = 0.3
style.window.xminimum = 0.621
style.window.xmaximum = 0.621
style.window.yminimum = 0.3
style.window.ymaximum = 0.3


##############################################################################
# Say
#
# Screen that's used to display adv-mode dialogue.
# http://www.renpy.org/doc/html/screen_special.html#say
screen say(who, what, side_image=None, two_window=False):

# Decide if we want to use the one-window or two-window variant.
if not two_window:

# The one window variant.
window:
id "window"

has vbox:
style "say_vbox"

if who:
text who id "who"

text what id "what"

else:

# The two window variant.
vbox:
style "say_two_window_vbox"

if who:
window:
style "say_who_window"

text who:
id "who"

window:
id "window"
pos 0.03
has vbox:
style "say_vbox"

text what id "what"

# If there's a side image, display it above the text.
if side_image:
add side_image
else:
add SideImage() xalign 0.5 yalign 0.5

# Use the quick menu.
use quick_menu

style nvl_dialogue:
justify True
xpos (0.07)

style say_dialogue:
justify True
xpos (0.07)

majike
Newbie
Posts: 21
Joined: Thu Feb 04, 2016 4:28 am
Contact:

Re: Say Text Window Has Inconsistent Width

#2 Post by majike » Thu Oct 25, 2018 7:23 pm

Does no-one have any solution? My entire project cannot advance without a solution to this problem. :(

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1951
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Say Text Window Has Inconsistent Width

#3 Post by Imperf3kt » Thu Oct 25, 2018 8:57 pm

What resolution is your game.?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

majike
Newbie
Posts: 21
Joined: Thu Feb 04, 2016 4:28 am
Contact:

Re: Say Text Window Has Inconsistent Width

#4 Post by majike » Fri Oct 26, 2018 1:00 am

Imperf3kt wrote:
Thu Oct 25, 2018 8:57 pm
What resolution is your game.?
1024x768.

majike
Newbie
Posts: 21
Joined: Thu Feb 04, 2016 4:28 am
Contact:

Re: Say Text Window Has Inconsistent Width

#5 Post by majike » Fri Dec 07, 2018 12:03 am

Does anyone have any idea how to fix this? I've spent several hours at a time trying to fix it, but no matter what I try, I can't fix this issue. It's really driving me nuts, especially as every other engine I've experimented with just isn't right (TWINE might be okay if it wasn't for its interface and lack of undo functionality, various others require players to download an interpreter [which most wouldn't be bothered to do}, etc.).

Post Reply

Who is online

Users browsing this forum: martingerdes