Text Shifting with the Side Image?

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
HidekiKun
Newbie
Posts: 14
Joined: Thu Sep 18, 2014 3:47 pm
Projects: Red Ties
Tumblr: hideki-husbando
Deviantart: vissnande
Skype: resu-baka
Soundcloud: Cicinee
Location: Cananadia
Contact:

Text Shifting with the Side Image?

#1 Post by HidekiKun »

Finally done with my interface but the problem that comes now with it is that whenever the side image for my character appears, the text he says shifts to the left, while the text that's from the narrator, or any other character, moves according to the padding on the left side.

Image

This is the instance of the text moving to the side. ^^^^^^^^^

Image

And the text as to how it should have been. ^^^^^^^^^

Code: Select all

    #########################################
    ## 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 = ("GUI/text/text_talk_image.png")

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

    # style.window.left_margin = 6
    # style.window.right_margin = 6
    # style.window.top_margin = 6
    # style.window.bottom_margin = 6

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

    style.window.left_padding = 165
    style.window.right_padding = 30
    style.window.top_padding = 20
    # style.window.bottom_padding = 6

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

    style.window.yminimum = 180

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"

            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"

                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.015 yalign 0.975
I really can't pinpoint the problem-- might be the padding or something else that I'm missing? Though thankfully it's centralized to just this character and not multiple... the problem is that he's the main character. :(

Post Reply

Who is online

Users browsing this forum: Google [Bot]