Improve text box and animate it

This commit is contained in:
LoafyLemon 2024-05-21 01:58:08 +01:00
parent 18b1b271bb
commit a56d826a10
3 changed files with 33 additions and 27 deletions

BIN
game/gui/creamy_pumpkin_pie/namebox.png (Stored with Git LFS)

Binary file not shown.

View File

@ -20,10 +20,7 @@ screen say(who, what, side_image=None, icon=None):
id "textbox" id "textbox"
style "textbox" style "textbox"
# TODO: Remove after 1080p gets implemented at gui_show_hide
at transform:
zoom 0.5
xalign 0.5
# Ren'py hard crashes without textbox windows, # Ren'py hard crashes without textbox windows,
# this is the workaround that just works. # this is the workaround that just works.
@ -82,46 +79,46 @@ style quickbox_button_text:
color "#bbbbbb" color "#bbbbbb"
hover_color "#ffffff" hover_color "#ffffff"
selected_color "#EA8E61" selected_color "#EA8E61"
outlines [(3, "#000000", 1, 1)] outlines [(2, "#000000", 1, 1)]
size 36 size 24
style textbox: style textbox:
ysize 250 ysize 125
yalign 1.0 align (0.5, 1.0)
background Transform(Image("gui/creamy_pumpkin_pie/textbox.png", xalign=0.5, yalign=1.0, oversample=2), alpha=0.5) background Transform(Image("gui/creamy_pumpkin_pie/textbox.png", xalign=0.5, yalign=1.0, oversample=4), alpha=0.5)
style what: style what:
xpos 0.5 xpos 0.5
ypos 20 ypos 10
xsize 1000 xsize 500
xoffset -480 xoffset -240
color "#fff" color "#fff"
outlines [(3, "#000000", 1, 1)] outlines [(2, "#000000", 1, 1)]
hinting "bytecode" hinting "bytecode"
size 32 size 24
justify True justify True
style namebox: style namebox:
ysize 43 # Halved due to oversampling ysize 22 # Halved due to oversampling
padding (50, 0, 50, 0) padding (32, 0, 32, 0)
fit_first True fit_first True
xpos 0.5 xpos 0.5
yalign 1.0 yalign 1.0
xanchor 0.0 xanchor 0.0
offset (-570, -250) offset (-320, -125)
background Transform(Frame("gui/creamy_pumpkin_pie/namebox.png", 48, 0, 48, 0, oversample=2, tile=True), alpha=0.5) background Transform(Frame(Image("gui/creamy_pumpkin_pie/namebox.png", oversample=4), 32, 0, 32, 0, tile=True), alpha=0.5)
style who: style who:
color "#EA8E61" color "#EA8E61"
outlines [(3, "#000000", 1, 1)] outlines [(2, "#000000", 1, 1)]
hinting "auto" hinting "auto"
font gui.bold_font font gui.bold_font
size 42 size 32
style quickbox is namebox: style quickbox is namebox:
padding (50, 0, 50, 0) padding (32, 0, 32, 0)
xanchor 1.0 xanchor 1.0
xoffset 570 xoffset 320
style hider is namebox: style hider is namebox:
align (0.5, 1.0) align (0.5, 1.0)
@ -192,6 +189,15 @@ transform gui_perspective_hover:
easein 0.1 matrixtransform ScaleMatrix(1.05, 1.05, 1.05) easein 0.1 matrixtransform ScaleMatrix(1.05, 1.05, 1.05)
easeout 0.1 matrixtransform ScaleMatrix(1.0, 1.0, 1.0) easeout 0.1 matrixtransform ScaleMatrix(1.0, 1.0, 1.0)
transform gui_show_hide(new_widget=None, old_widget=None):
delay 0.1
on start:
alpha 0
zoom 1.05
easein 0.1 zoom 1.00 alpha 1
on hide:
easeout 0.1 zoom 0.95 alpha 0
style choice_vbox is vbox style choice_vbox is vbox
style choice_button is button style choice_button is button
style choice_button_text is button_text style choice_button_text is button_text

View File

@ -120,15 +120,15 @@ define config.game_main_transition = f3
define config.end_splash_transition = d3 define config.end_splash_transition = d3
define config.end_game_transition = fade define config.end_game_transition = fade
define config.after_load_transition = fade define config.after_load_transition = fade
define config.window_show_transition = d3 define config.window_show_transition = None
define config.window_hide_transition = d3 define config.window_hide_transition = None
define config.adv_nvl_transition = d3 define config.adv_nvl_transition = d3
define config.nvl_adv_transition = d3 define config.nvl_adv_transition = d3
define config.enter_yesno_transition = None define config.enter_yesno_transition = None
define config.exit_yesno_transition = None define config.exit_yesno_transition = None
define config.enter_replay_transition = None define config.enter_replay_transition = None
define config.exit_replay_transition = None define config.exit_replay_transition = None
define config.say_attribute_transition = d3 define config.say_attribute_transition = None
# Engine Compatibility # Engine Compatibility
define config.check_conflicting_properties = True define config.check_conflicting_properties = True