Adding margin/padding on say_label property

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
Jibus
Regular
Posts: 135
Joined: Tue May 26, 2015 9:45 am
Contact:

Adding margin/padding on say_label property

#1 Post by Jibus »

I am trying to add a bottom margin between the dialogue and the namebox :

In options.rpy

Code: Select all

style.say_label.bottom_margin = 10
But has no effect. I have the same result if i use bottom_padding.

Also, i would like to add a left margin on the dialogue only.

Note : say_who_window is FALSE.

User avatar
kitsalai
Regular
Posts: 65
Joined: Wed Jan 08, 2014 11:05 pm
Projects: Imaginatum
Location: US
Contact:

Re: Adding margin/padding on say_label property

#2 Post by kitsalai »

I am a bit unclear what you mean by say_who_window is FALSE. You're using the two_window option, right?

If you didn't change too much from the default screens.rpy and options.rpy, the say_who_window style affects the namebox and window style affects the dialoguebox.

Code: Select all

style.say_who_window.bottom_margin = 10

Code: Select all

style.window.left_margin = 10

philat
Eileen-Class Veteran
Posts: 1910
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Adding margin/padding on say_label property

#3 Post by philat »

Assuming that what you meant by two_window false is that you're NOT using show_two_window, you can use spacing / xpos in the say screen directly (probably the simplest way).

Code: Select all

##############################################################################
# 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"
                spacing 10 # this

            if who:
                text who id "who"

            text what id "what" xpos 10 # this

Jibus
Regular
Posts: 135
Joined: Tue May 26, 2015 9:45 am
Contact:

Re: Adding margin/padding on say_label property

#4 Post by Jibus »

Thanks you very much for your help !

Worked perfectly !

Post Reply

Who is online

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