WTS/game/scripts/gui/frame.rpy

82 lines
1.9 KiB
Plaintext
Raw Normal View History

2024-05-24 14:19:34 +00:00
label modal_popup(title, entry, img=None, confirm="Okay"):
$ disable_game_menu()
play sound "sounds/pop01.ogg"
call screen modal_popup(title, entry, img, confirm)
$ enable_game_menu()
return
screen modal_popup(title, entry, img=None, confirm="Okay", xysize=(600, 350)):
modal True
layer "interface"
zorder 5
style_prefix "frame"
default img = img and renpy.loadable(img)
add "gui_fade_both" at gui_fade
frame:
at gui_modal_popup
xysize xysize
label title
vbox:
ypos 20
add img xalign 0.5
text entry
textbutton confirm align (1.0, 1.0) action Return(True)
transform gui_fade:
on show:
alpha 0.0
easein 1.0 alpha 1.0
on hide:
easeout 0.5 alpha 0.0
transform gui_modal_popup:
subpixel True
on show:
zoom 0.0
alpha 0.0
easein_back 0.5 zoom 1.0 alpha 1.0
on hide:
easeout_back 0.4 zoom 0.0 alpha 0.0
image gui_fade_both = Fixed(Frame(Image("gui/creamy_pumpkin_pie/fade_top.png", oversample=4)), Frame(Image("gui/creamy_pumpkin_pie/fade_bottom.png", oversample=4)))
style frame is empty:
align (0.5, 0.5)
fit_first True
xfill False
yfill False
padding (50, 10)
# background Frame(Image("gui/creamy_pumpkin_pie/window_bottom.png", oversample=4), 8, 8, 8, 75, tile=False)
background Frame(Image("gui/creamy_pumpkin_pie/window_frame.png", oversample=4), 50, 100, 50, 75, tile=False)
style frame_vbox:
xalign 0.5
first_spacing 0
yspacing 5
fit_first True
xfill False
yfill False
style frame_label:
xalign 0.5
yoffset -8
style frame_label_text is who:
size 24
color "#fff"
outlines [(2, "#000000", 1, 1)]
style frame_text is what:
color "#fff"
outlines [(1, "#000000", 1, 1)]
hinting "bytecode"
size 12