Is ti possible to change style.window.background on the go ? for example to change theme for some character or in some part of the game ?
Ho do you push an image in the front of text window ?
Thanks!
style.window.background and layer order
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.
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.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: style.window.background and layer order
You can give Character a window_background argument, which specifies the background image that's used when that Character is shown.
What are you trying to do by putting an image above the window? I ask because there's multiple ways to do this, and I want to be sure you use the right one.
What are you trying to do by putting an image above the window? I ask because there's multiple ways to do this, and I want to be sure you use the right one.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: style.window.background and layer order
No, i meant on text area... if i want to change the style (in my case - images) of area where text is shown, for example to have few types of it...PyTom wrote:You can give Character a window_background argument, which specifies the background image that's used when that Character is shown..
for example, if in some action scene, i would like to put image (character or object) over the text area, to have a effect closing up...PyTom wrote: What are you trying to do by putting an image above the window? I ask because there's multiple ways to do this, and I want to be sure you use the right one.
tnx!
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: style.window.background and layer order
Yeah, that's what I thought you meant. The right way to do this is to define a window_background on the Character. That's the per interaction equivalent of style.window.background.npantic wrote:No, i meant on text area... if i want to change the style (in my case - images) of area where text is shown, for example to have few types of it...
The dirty little secret of Ren'Py is that Character objects don't really represent characters, but rather collections of settings that are used when dialogue is shown.
This is probably a good candidate for the user of layers:PyTom wrote: for example, if in some action scene, i would like to put image (character or object) over the text area, to have a effect closing up...
Code: Select all
init python:
config.layers.append('ontop')
label test:
show myimage onlayer ontop
"The image is on top of this text!
hide myimage onlayer ontop
"Now it's gone!"
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: Ahrefs [Bot]