NVL Textbox Not Accepting Custom Layer

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
noeinan
Eileen-Class Veteran
Posts: 1153
Joined: Sun Apr 04, 2010 10:10 pm
Projects: Ren'Py QuickStart, Crimson Rue
Organization: Statistically Unlikely Games
Deviantart: noeinan
Github: noeinan
Location: Washington State, USA
Contact:

NVL Textbox Not Accepting Custom Layer

#1 Post by noeinan »

Hello! So, I've been using custom layers to organize my various screens and have recently run into an issue. My game has nvl mode and I'm using a customized nvl textbox. I have an overlay that I want to appear on top of the nvl screen, but it keeps showing up underneath it. I'm wondering if I did anything wrong in my code that is causing this problem? Any help is much appreciated!

In my options.rpy, in an init python block, I have added:

Code: Select all

config.layers = [ 'zero', 'master', 'transient', 'belowmid', 'midlayer', 'abovemid', 'backgrounds', 'textwindow', 'overlay2', 'screens', 'overlay']
I'm using "overlay2" because when I was searching around "overlay" has it's own meaning in RenPy and might not be up to date/working properly. But the important thing is, it should be showing up on top of the textwindow.


In overlay.rpy I've got:

Code: Select all

screen basic_overlay():
    layer "overlay2"

    ## Ensure this appears on top of other screens.
    zorder 2
    modal False
    add "gui/overlay/app_overlay.png"

    text hour() ypos 25 xpos 640
    text daystate ypos 75 xpos 680
    text weather ypos 125 xpos 680
    text ("Day: %d"%calendar.game_day) ypos 175 xpos 680
    text (calendar.month.join(" %d"%calendar.day)) ypos 225 xpos 620

    frame:

        xalign 0.0
        yalign 0.0
        xsize 543
        yfill True

        background None

        add "protag" xalign 0.5

    hbox:
        xalign 0.92
        yalign 0.0
        spacing 20

        imagebutton:
             auto "gui/icons/righthand_icon_%s.png"
             focus_mask True
             #action [Hide("basic_overlay"), ShowMenu("book_shelf")]

        imagebutton:
             auto "gui/icons/lefthand_icon_%s.png"
             focus_mask True
             #action [Hide("basic_overlay"), ShowMenu("book_shelf")]

        imagebutton:
             auto "gui/icons/rightfoot_icon_%s.png"
             focus_mask True
             #action [Hide("basic_overlay"), ShowMenu("book_shelf")]

        imagebutton:
             auto "gui/icons/leftfoot_icon_%s.png"
             focus_mask True
             #action [Hide("basic_overlay"), ShowMenu("book_shelf")]
Specifically, the imagebuttons should be on top of the textwindow. However, instead they show up behind my nvl textbox. Now, if I move the overlay2 layer to show up on top of "screens" then it will show up on top of the nvl textwindow. But also, the "do you want to exit the game" and other important screens will show up behind it, which is less than ideal. Also, I checked and the nvl textwindow is indeed on the "textwindow" layer instead of the "screens" layer, so I'm not sure why it's behaving this way.

Code: Select all

screen nvl(dialogue, items=None):
    layer "textwindow"
Image

Image
Image

User avatar
noeinan
Eileen-Class Veteran
Posts: 1153
Joined: Sun Apr 04, 2010 10:10 pm
Projects: Ren'Py QuickStart, Crimson Rue
Organization: Statistically Unlikely Games
Deviantart: noeinan
Github: noeinan
Location: Washington State, USA
Contact:

Re: NVL Textbox Not Accepting Custom Layer

#2 Post by noeinan »

Hm, still working on this one. It seems the nvl textbox is just not accepting the custom layer since custom layers work properly everywhere else.

I only found two threads that even somewhat mention someone doing this, but neither seem to apply to my issue...

viewtopic.php?t=17645
viewtopic.php?t=44987
Image

Image
Image

Post Reply

Who is online

Users browsing this forum: Bing [Bot]