Textbox: Window 2 not layered how I want it?

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
Geckos
Veteran
Posts: 471
Joined: Fri Aug 17, 2012 8:33 am
Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
Organization: Ithaqua Labs
Tumblr: geckosart
Deviantart: sitaart
Contact:

Textbox: Window 2 not layered how I want it?

#1 Post by Geckos »

I uploaded an image to show what I'm talking about. I've tried googling the problem, and moving the code around but the tree (the name window) is still showing up behind the text box window, despite my best efforts. Is there a way to fix this? as it is, the text box image (white/blue texture) is showing up over the name window.

Code: Select all

   

    style.say_who_window.background = Frame("namebox.png", 15, 15)
    style.say_who_window.xalign = 0.0
    style.say_who_window.yalign = 0.0
    style.say_who_window.xpos = 0 #For precise placement
    style.say_who_window.ypos = 157 #For precise placement
    style.say_who_window.left_padding = 5
    style.say_who_window.top_padding = 25
    style.say_who_window.right_padding = 0
    style.say_who_window.bottom_padding = 0
    style.say_who_window.xminimum = 152
    style.say_who_window.yminimum = 157
    style.say_who_window.xfill = False
    
    style.window.background = Frame("dialoguebox.png", 50, 50)

    style.window.top_margin = 6
    style.window.left_padding = 155
    style.window.top_padding = 35
    style.window.yminimum = 157

Attachments
fail3.jpg
Last edited by Geckos on Thu Sep 20, 2012 11:39 pm, edited 3 times in total.
Image ImageImage

junna
Veteran
Posts: 347
Joined: Sat Sep 08, 2012 4:16 am
Projects: DreamWalker; History; Adversity Competition
Contact:

Re: Textbox: Window 2 not layered how I want it?

#2 Post by junna »

maybe if you showed the code for that textbox someone could help you out better
chibi avvie by Meg (buprettyinpink).
WIP=>Image
Image<=helping out

User avatar
Geckos
Veteran
Posts: 471
Joined: Fri Aug 17, 2012 8:33 am
Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
Organization: Ithaqua Labs
Tumblr: geckosart
Deviantart: sitaart
Contact:

Re: Textbox: Window 2 not layered how I want it?

#3 Post by Geckos »

Updated with code! :3
Image ImageImage

Flince
Regular
Posts: 30
Joined: Fri Oct 08, 2010 9:48 am
Contact:

Re: Textbox: Window 2 not layered how I want it?

#4 Post by Flince »

Actually, does Renpy use the same method in displaying images in screen language (the one who comes last will be at the top)? If so then you might need to swap the code around into this

Code: Select all

screen say:
    default side_image = None
    default two_window = False

    if not two_window:
  
        window:
            id "window"
            has vbox:
                style "say_vbox"

            if who:
                text who id "who"

            text what id "what"

    else:
        vbox:
            style "say_two_window_vbox"

            window:
                id "window"

                has vbox:
                    style "say_vbox"

                text what id "what"
            if who:            
                window:
                    style "say_who_window"

                    text who:
                        id "who"
                                      
    if side_image:
        add side_image
    else:
        add SideImage() xalign 0.0 yalign 1.0
    use quick_menu

User avatar
Geckos
Veteran
Posts: 471
Joined: Fri Aug 17, 2012 8:33 am
Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
Organization: Ithaqua Labs
Tumblr: geckosart
Deviantart: sitaart
Contact:

Re: Textbox: Window 2 not layered how I want it?

#5 Post by Geckos »

That's what I meant when I said that I tried swapping the code around, so that they were placed before or after one another. It didn't help with layering the images.

If I try adding that code it gives me:

Parsing the script failed.
File "game/options.rpy", line 155: invalid syntax
screen say-->:

--> being an arrow, lol. :[
Image ImageImage

junna
Veteran
Posts: 347
Joined: Sat Sep 08, 2012 4:16 am
Projects: DreamWalker; History; Adversity Competition
Contact:

Re: Textbox: Window 2 not layered how I want it?

#6 Post by junna »

chibi avvie by Meg (buprettyinpink).
WIP=>Image
Image<=helping out

User avatar
Geckos
Veteran
Posts: 471
Joined: Fri Aug 17, 2012 8:33 am
Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
Organization: Ithaqua Labs
Tumblr: geckosart
Deviantart: sitaart
Contact:

Re: Textbox: Window 2 not layered how I want it?

#7 Post by Geckos »

junna wrote:does the cookbook http://lemmasoft.renai.us/forums/viewto ... =51&t=9233
not help?
No, that's where I got the code from originally. I've temporarily fixed it by just chopping the images up in photoshop which is fine. I was just sort of hoping there was a code version to fix it. Thank you anyway! :3
Image ImageImage

junna
Veteran
Posts: 347
Joined: Sat Sep 08, 2012 4:16 am
Projects: DreamWalker; History; Adversity Competition
Contact:

Re: Textbox: Window 2 not layered how I want it?

#8 Post by junna »

Geckos wrote:That's what I meant when I said that I tried swapping the code around, so that they were placed before or after one another. It didn't help with layering the images.

If I try adding that code it gives me:

Parsing the script failed.
File "game/options.rpy", line 155: invalid syntax
screen say-->:

--> being an arrow, lol. :[
what is your screen called? usually people write

Code: Select all

screen insertscreennamehere: #meaning the name you gave your screen
in place of "say". I think that's where the problem might be. ^^;;
chibi avvie by Meg (buprettyinpink).
WIP=>Image
Image<=helping out

Flince
Regular
Posts: 30
Joined: Fri Oct 08, 2010 9:48 am
Contact:

Re: Textbox: Window 2 not layered how I want it?

#9 Post by Flince »

I used the defualt codes that come with Renpy, I don't know why it would give an invalid syntax error.
Still it kinda bugs me that such a seemingly simple problem can't be solved by swapping the codes around >_>

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]