Page 1 of 1

Styling say_who_window [SOLVED]

Posted: Fri Mar 04, 2016 7:16 am
by colacatinthehat
Hello! Sorry to bother anyone but I've run into a jam and my ten million tabs open doesn't seem to be helping so I thought I'd ask here!

I have a speech window mock-up with the "show_two_window" as a slight overlay like this:
Image

But when I actually try and implement it under "style.say_who_window" the window appears behind the text box like so:
Image

(Theres not much to the code just
style.say_who_window.left_margin=150
style.say_who_window.ypos=400)

I looked into layers but I can't seem to find anything about layering elements in the options menu

I'm not looking to have different text boxes for every character so I tried simply making speaking characters have the mock-up version and allow the default window to not have the "say_who" box but then I couldn't get the "say_label" to move to the right position it wouldn't budge or would mysteriously vanish.

I've programmed before a bit before but I'm pretty new to renpy so I'm a little lost! I hope you can help me!
Thank you for you time

Re: Styling say_who_window

Posted: Fri Mar 04, 2016 7:53 am
by Impulse
Update: Realized that I didn't even answer the right question. I'm sorry, but I'm glad you got help :)

Re: Styling say_who_window

Posted: Fri Mar 04, 2016 8:14 am
by gas
I'm not tied in any way to the commenter above.

You need to rewrite the say() screen a little, to have the who window after the say window.

Code: Select all

    else:

        #--->CHANGES START HERE. The two window variant, but in fact is a normal window
        window:
            id "window"

            has vbox:
                style "say_vbox"

            text what id "what"
        if who:
            window:
                style "say_who_window" #use style.say_who_window.xpos and style.say_who_window.ypos declaration in your config script to place it where you want
 
                text who:
                    id "who"
NOTE: don't copy/paste directly, indent is not correct

Re: Styling say_who_window

Posted: Fri Mar 04, 2016 9:17 am
by colacatinthehat
gas wrote:I'm not tied in any way to the commenter above.

You need to rewrite the say() screen a little, to have the who window after the say window.
Ahh, thank you so much! You have freed me from window hell!! I hadn't thought to go hunting in the screens script but it seems so obvious now. Thank you soso much!! 8D

Re: Styling say_who_window [SOLVED]

Posted: Sat Mar 05, 2016 1:08 pm
by korova
I had a similar problem, that I solved using the "order_reverse" property of the vbox like that

Code: Select all

        # Cas avec deux fenĂȘtres.
        vbox:
            style "say_two_window_vbox"
            order_reverse True  ### ===> added property

            if who:
                window:
                    style "say_who_window"

                    text who:
                        id "who"

            window:
                id "window"

                has vbox:
                    style "say_vbox"

                text what id "what"
 
documentation here http://www.renpy.org/doc/html/style_pro ... er_reverse