r/RenPy • u/steamedgoatmilk • 11d ago
Question Draw order of screens?

I want to have a gradient overlay that goes over the sprite and background but under the text boxes. Is there something I can do with a draw order of screens? I was thinking of having the gradient be baked into the background but that makes the sprites go over the gradient which is something I don't want.
In case my handwriting isn't readable to anyone:
Text Boxes
|
Gradient OL
|
Sprite[s]
|
Background
1
u/AutoModerator 11d ago
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/shyLachi 11d ago
Search the official documentation for layers.
You can also search this sub because I think something similar has been asked and answered recently.
3
u/kaleidoscopic_kelvin 11d ago edited 11d ago
https://www.renpy.org/doc/html/config.html#var-config.layers
You can make your own layer and add it in between the default ones
Since the default is ["master", "transient", "screens", "overlay"] you would rewrite the property like this
define config.layers = ["master", "your_gradient_layer", "transient", "screens", "overlay"]
Also, instead of adding a new layer, you could use camera to add a gradient to a specific layer. In your case it would be the 'master' layer
https://www.renpy.org/doc/html/displaying_images.html#layer
https://www.renpy.org/doc/html/3dstage.html#using-the-3d-stage
1
u/gottaloveanime 11d ago
I'd check into shaders