Page 1 of 1

(Solved)Need a Persistent/Hidable Image to display on top of textbox

Posted: Thu Jan 11, 2018 4:02 am
by Vluut Games
I am using 6.99.13 and trying to figure out how to display (and hide) an image above the say_window, like a side image, but I want it to be persistent regardless of whose talking and only hide when I tell it to. This will be the protagonist, so it won't just be one image as they will display emotions - but the main point is to put it on top of the textbox and everything else.

I have tried setting the zorder of the say screen to 1 and the zorder of the image to 2 and the text box still appears above the image. I set the zorder of the image to 500 and no better. The say_window does not appear to accept zorder as a style parameter. I'm not sure where to set the zorder to force this image(or others) to the top.

Thanks for any help!

Andrews
Vluut Inclusive Games
www.vluut.com

Re: Need a Persistent/Hidable Image to display on top of textbox

Posted: Thu Jan 11, 2018 6:04 am
by Imperf3kt
Why not just show a regular image (with positioning) and never "hide" it?

Re: Need a Persistent/Hidable Image to display on top of textbox

Posted: Thu Jan 11, 2018 8:11 am
by Remix
Ren'py only uses zorder within each screen for displayables (or layer for screens) as far as I know.
Presuming you are not adding the image to the say screen, maybe just set the layer when shown...

show image_ref onlayer "overlay"

Re: (Solved)Need a Persistent/Hidable Image to display on top of textbox

Posted: Thu Jan 11, 2018 10:55 pm
by Vluut Games
Brilliant! Thank you! That worked! Now that I understand layers I'm going to make a million of them!

Re: (Solved)Need a Persistent/Hidable Image to display on top of textbox

Posted: Fri Jan 12, 2018 7:35 am
by Remix
lol, have fun.

For info, Ren'py as standard generally has 4 layers: [ 'master', 'transient', 'screens', 'overlay' ]
The current best practice to add your own layers to that is with renpy.add_layer(layer, above=None, below=None, menu_clear=True)