[Solved] How to make name box be in front of dialogue box?

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
Lockvia
Regular
Posts: 124
Joined: Wed Mar 26, 2014 8:02 pm
Projects: Prank Masters
Organization: Lockvia Studios
Tumblr: Lockvia
Deviantart: Lockvia
Location: Australia
Contact:

[Solved] How to make name box be in front of dialogue box?

#1 Post by Lockvia » Mon Apr 27, 2015 9:39 pm

I'm having a problem with the name box and the dialogue box in the quick menu. For some reason the the name box is hiding behind the dialogue box. I'm not sure what to do to make the name box sit in front of the dialogue box.

Here's my current code in Options.rpy:

Code: Select all

style.say_who_window.background = "gui/namebox.png"
style.window.background = "gui/dialoguebox.png"
Last edited by Lockvia on Thu Apr 30, 2015 5:27 am, edited 1 time in total.
Image

User avatar
Zetsubou
Miko-Class Veteran
Posts: 513
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: How to make name box be in front of dialogue box?

#2 Post by Zetsubou » Mon Apr 27, 2015 9:57 pm

Try setting say_window.background instead of window.background.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

Image

User avatar
Lockvia
Regular
Posts: 124
Joined: Wed Mar 26, 2014 8:02 pm
Projects: Prank Masters
Organization: Lockvia Studios
Tumblr: Lockvia
Deviantart: Lockvia
Location: Australia
Contact:

Re: How to make name box be in front of dialogue box?

#3 Post by Lockvia » Mon Apr 27, 2015 10:07 pm

Just tried it and now the name is behind the name box.
Image

User avatar
Zetsubou
Miko-Class Veteran
Posts: 513
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: How to make name box be in front of dialogue box?

#4 Post by Zetsubou » Mon Apr 27, 2015 10:13 pm

Have you modified your say screen? Otherwise I can't think of any reason why changing window to say_window would move the say_who_window text.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

Image

User avatar
Lockvia
Regular
Posts: 124
Joined: Wed Mar 26, 2014 8:02 pm
Projects: Prank Masters
Organization: Lockvia Studios
Tumblr: Lockvia
Deviantart: Lockvia
Location: Australia
Contact:

Re: How to make name box be in front of dialogue box?

#5 Post by Lockvia » Mon Apr 27, 2015 10:24 pm

I think I did.

Here's my current code:

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:

    # Defaults for side_image and two_window
    default side_image = None
    default one_window = False

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

        # 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"

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

            has vbox:
                style "say_vbox"

            if who:
                text who id "who"

            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.0 yalign 1.0

    # Use the quick menu.
    use quick_menu
And now that I've changed it back to the original code it looks like the screenshot. Here's the original code:

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.0 yalign 1.0

    # Use the quick menu.
    use quick_menu
Image

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to make name box be in front of dialogue box?

#6 Post by KairuKyun » Tue Apr 28, 2015 12:02 am

You need to make it a two window, one for the namebox and one for the text said. So you will have to cut those in half and re position them i had the same problem.
So under here you will define the placement of your name box:

Code: Select all

                has vbox:
                    style "say_vbox"
                    ypos 20 #Change to your number
                    xpos 20 #Change to your number
and here you will define the placement of you text in the name box:

Code: Select all

                    text who:
                        id "who"
                        ypos 20 #Change to your number
And set your screen to true for two_window:

Code: Select all

screen say(who, what, side_image=None, two_window=True):
At least i think.
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

User avatar
Lockvia
Regular
Posts: 124
Joined: Wed Mar 26, 2014 8:02 pm
Projects: Prank Masters
Organization: Lockvia Studios
Tumblr: Lockvia
Deviantart: Lockvia
Location: Australia
Contact:

Re: How to make name box be in front of dialogue box?

#7 Post by Lockvia » Thu Apr 30, 2015 5:26 am

Thank you for all the replies. I ended up changing my UI design and it worked!
Image

Post Reply

Who is online

Users browsing this forum: Bing [Bot]