Code: Select all
screen notification_floating(message):
zorder 100
add "gui/notification_background.png" xalign 0.15 yalign 0.43 at _notify_transform_float
text message:
at _notify_transform_float
size 25
font "GoodDog.otf"
color "#66cc00"
timer 3.25 action Hide('notification_floating')
Hi, this is my customized notificaiton screen.
My displayed text lenght is variable and i would like my background image to adjust.
I know this is possible because I've already done it (but not on purpose ^^) on my namebox
(The namebox background image adjust itself in fonction of my charachters names)
I've isolated and identified the code that make the namebox working but iam not able to reproduce it neither to understand it.
The original Renpy code look something like this :
Code: Select all
style window is default
style say_label is default
style say_dialogue is default
style say_thought is say_dialogue
style namebox is default
style namebox_label is say_label
style namebox:
xpos gui.name_xpos
xanchor gui.name_xalign
xsize gui.namebox_width
ypos gui.name_ypos
ysize gui.namebox_height
background Frame("gui/namebox.png", gui.namebox_borders, tile=gui.namebox_tile, xalign=gui.name_xalign)
padding gui.namebox_borders.padding
style say_label:
properties gui.text_properties("name", accent=True)
xalign gui.name_xalign
yalign 0.5
Thank you !