Namebox stretching? [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
kitsubasa
Regular
Posts: 148
Joined: Thu Nov 28, 2013 7:29 pm
Projects: Inverness Nights
Tumblr: kitsubasa
Location: New Zealand
Contact:

Namebox stretching? [SOLVED]

#1 Post by kitsubasa » Mon Nov 03, 2014 12:19 am

I've been trying to get a namebox working, but for some reason it keeps stretching out to a larger size than it's meant to be.

Here is a picture showing how the stretching looks...

Image

... and here's a file, with dimensions listed, of the way it's meant to display.

Image

In options.rpy I have the following code setting style info for textbox+namebox:

Code: Select all

 
    style.window.background = Frame("Resources/GUI/advbox.png", 1437, 180)
    style.say_who_window.background = Frame("Resources/GUI/namebox.png", 288, 64)

    style.window.left_padding = 70
    style.window.right_padding = 70
    style.window.top_padding = 50
    style.window.bottom_padding = 50

    style.window.yminimum = 180
    
    style.say_who_window.background.yminimum = 64
    style.say_who_window.background.xminimum = 288
    
    style.say_who_window.background.left_padding = 0
    style.say_who_window.background.right_padding = 0
    style.say_who_window.background.top_padding = 0
    style.say_who_window.background.bottom_padding = 0
And here's the code I'm using in script.rpy to call the namebox.

Code: Select all

$ tris = Character('Tristram', show_two_window=True, 
        who_color = "#FFFFC0",
        who_font = "Resources/fonts/Thyssen.ttf", who_size=20,
        )
Could anyone give me advice on how to fix this? I've tried changing all the padding settings, altering the font/text size, and altering the ymin/xmin settings and the like, but several days on and I'm still no closer to making it work. D:
Last edited by kitsubasa on Mon Nov 03, 2014 1:43 am, edited 1 time in total.
Image

User avatar
ArachneJericho
Regular
Posts: 196
Joined: Sun Jun 22, 2014 2:04 am
Projects: Kaguya Hime
Tumblr: mousedeerproductions
Location: Seattle, WA, USA
Contact:

Re: Namebox stretching?

#2 Post by ArachneJericho » Mon Nov 03, 2014 12:24 am

Code: Select all

 style.say_who_window.background.left_padding = 0
Shouldn't this be

Code: Select all

style.say_who_window.left_padding = 0
You're applying the padding to the background instead of the window object, and thus the say_who window is just directly inheriting the padding from window.

User avatar
kitsubasa
Regular
Posts: 148
Joined: Thu Nov 28, 2013 7:29 pm
Projects: Inverness Nights
Tumblr: kitsubasa
Location: New Zealand
Contact:

Re: Namebox stretching?

#3 Post by kitsubasa » Mon Nov 03, 2014 1:42 am

Thank you, that fixed it! Everything's working now. : )
Image

Post Reply

Who is online

Users browsing this forum: No registered users