[SOLVED] Say window ATL and side images
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.
Re: Say window ATL and side images
Are you going to use two window and/or character names in later part of your game?
If not, we might as well remove those block from the say screen.
If not, we might as well remove those block from the say screen.
My avatar is courtesy of Mellanthe
Re: Say window ATL and side images
I do intend to use the two window format as well...if removing the two window will end up fixing this issue I am willing to give it a shot though ! But best case is that include two window, I'm willing to let go of side images in two window because the Character name will be shown so the reader will know who is who. For one window, I obviously need the side image.
Re: Say window ATL and side images
If you ask me you should just go with my original snippet. It wasn't ideal, but at least it didn't bug out. I think it's an okay compromise.
Phoenix Star - Persistence, perseverance, ambition.
...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
Deviant Art: ...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
![Image](http://st.deviantart.net/minish/touch-icons/android-48.png)
Discord: saltome
Itch: Phoenix Start
Re: Say window ATL and side images
Hi Saltome,
I have no problem with using your code, however, I attached a demo showing the issue with that code... The text does not fit in the required area and the dialogue box is not anchored. If that can be fixed then this it fine.
Is there no way to change the dialogue box zorder? I think if we can freely change zorder this issue will become a lot more simple
I have no problem with using your code, however, I attached a demo showing the issue with that code... The text does not fit in the required area and the dialogue box is not anchored. If that can be fixed then this it fine.
Is there no way to change the dialogue box zorder? I think if we can freely change zorder this issue will become a lot more simple
Re: Say window ATL and side images
I was talking about the code before. The one showing the side image underneath the background.
And matter-of-factly, you can simply make the side image semi-transparent, to allow text to be visible through.
As far as zorder, that's only applied to screens. But even if you were able to figure out a way to change it, you need to be cautious of the consequences. Changing the zorder of screens means they won't have the zorder that is expected, and it can easily lead to graphical bugs where different screens overlap in weird ways.
And matter-of-factly, you can simply make the side image semi-transparent, to allow text to be visible through.
As far as zorder, that's only applied to screens. But even if you were able to figure out a way to change it, you need to be cautious of the consequences. Changing the zorder of screens means they won't have the zorder that is expected, and it can easily lead to graphical bugs where different screens overlap in weird ways.
Phoenix Star - Persistence, perseverance, ambition.
...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
Deviant Art: ...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
![Image](http://st.deviantart.net/minish/touch-icons/android-48.png)
Discord: saltome
Itch: Phoenix Start
Re: Say window ATL and side images
*facepalm* The problem was happening because the side image was inside the window, that was bugging it out. With a little fiddling I seem to have tricked it.
Code: Select all
screen say(who, what, side_image=None, two_window=False):
if side_image:
window:
id "window"
null
#has vbox:
#style "say_vbox"
add side_image
else:
if not two_window:
window:
id "window"
null
#has vbox:
#style "say_vbox"
add SideImage() xalign 0.0 yalign 1.0
else:
window:
id "window"
null
add SideImage() xalign 0.0 yalign 1.0
# Decide if we want to use the one-window or two-window variant.
if not two_window:
# The one window variant.
# window:
# id "window"
vbox:
ypos 576 #yalign 0.8
style "say_vbox"
if who:
ypos 612 #yalign 0.85
text who id "who" xpos 256 xmaximum 800
text what id "what" xpos 256 xmaximum 800
else:
# The two window variant.
vbox:
ypos 562 #yalign 0.78
style "say_two_window_vbox"
if who:
window:
style "say_who_window"
text who:
id "who" xpos 256 xmaximum 800
# window:
# id "window"
null height 6
vbox:
style "say_vbox"
text what id "what" xpos 256 xmaximum 800
# If there's a side image, display it above the text.
# Use the quick menu.
use quick_menu
Phoenix Star - Persistence, perseverance, ambition.
...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
Deviant Art: ...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
![Image](http://st.deviantart.net/minish/touch-icons/android-48.png)
Discord: saltome
Itch: Phoenix Start
Re: Say window ATL and side images
Hi Saltome,
Wow you did it! Yes I can confirm it works perfectly. I had to adjust the xpos/ypos values but otherwise this is some solid stuff!
Thanks a lot.
Although the main topic of this post got lost in time, I'll leave that for another time![Smile :)](./images/smilies/icon_smile.gif)
I'll mark it as solved.
Thanks a lot Saltome.
Wow you did it! Yes I can confirm it works perfectly. I had to adjust the xpos/ypos values but otherwise this is some solid stuff!
Thanks a lot.
Although the main topic of this post got lost in time, I'll leave that for another time
![Smile :)](./images/smilies/icon_smile.gif)
I'll mark it as solved.
Thanks a lot Saltome.
Re: [SOLVED] Say window ATL and side images
And about your other problem...
As per the example of this thread:
viewtopic.php?f=8&t=43083
By the way did we really need to go through all this?
If your side image is never overlapping with the text, it doesn't make a difference if it's drawn before it or after it.
As per the example of this thread:
viewtopic.php?f=8&t=43083
Code: Select all
transform anim:
on show:
linear 0 yoffset 0
linear 0.1 yoffset 10
linear 0.1 yoffset 0
linear 0.1 yoffset -10
linear 0.1 yoffset 0
repeat(3)
Code: Select all
screen say(who, what, side_image=None, two_window=False):
if side_image:
window:
id "window"
null
at anim
#has vbox:
#style "say_vbox"
add side_image
else:
if not two_window:
window:
id "window"
null
at anim
#has vbox:
#style "say_vbox"
add SideImage() xalign 0.0 yalign 1.0 at anim
else:
window:
id "window"
null
at anim
add SideImage() xalign 0.0 yalign 1.0 at anim
# Decide if we want to use the one-window or two-window variant.
if not two_window:
# The one window variant.
# window:
# id "window"
vbox:
ypos 576 #yalign 0.8
style "say_vbox"
at anim
if who:
ypos 612 #yalign 0.85
text who id "who" xpos 256 xmaximum 800 at anim
text what id "what" xpos 256 xmaximum 800 at anim
else:
# The two window variant.
vbox:
ypos 562 #yalign 0.78
style "say_two_window_vbox"
if who:
window:
style "say_who_window"
at anim
text who:
id "who" xpos 256 xmaximum 800
# window:
# id "window"
null height 6
vbox:
style "say_vbox"
at anim
text what id "what" xpos 256 xmaximum 800
# If there's a side image, display it above the text.
# Use the quick menu.
use quick_menu
If your side image is never overlapping with the text, it doesn't make a difference if it's drawn before it or after it.
Phoenix Star - Persistence, perseverance, ambition.
...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
Deviant Art: ...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
![Image](http://st.deviantart.net/minish/touch-icons/android-48.png)
Discord: saltome
Itch: Phoenix Start
Re: [SOLVED] Say window ATL and side images
Hi Saltome,
Ill give that transform a shot (I didn't try since I thought it might trigger everytime I use window show)
Regarding side images, actually the side images do overlap for me since I use slightly larger sized than in the demo, therefore I guess it was needed :p
Plus anyone else who wants to do the same now has a resource.
On a side note, loads of visual novels from Japan that I have played do make the text appear over the side images, so I thought it was a basic feature for Ren'Py... how wrong I was :p
Ill give that transform a shot (I didn't try since I thought it might trigger everytime I use window show)
Regarding side images, actually the side images do overlap for me since I use slightly larger sized than in the demo, therefore I guess it was needed :p
Plus anyone else who wants to do the same now has a resource.
On a side note, loads of visual novels from Japan that I have played do make the text appear over the side images, so I thought it was a basic feature for Ren'Py... how wrong I was :p
Who is online
Users browsing this forum: No registered users