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
|
|
|
|
|
2024-05-29 20:31:12 +00:00
|
|
|
screen modal_popup(title, entry, img=None, confirm="Okay"):
|
2024-05-24 14:19:34 +00:00
|
|
|
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
|
2024-05-29 20:31:12 +00:00
|
|
|
|
2024-05-24 14:19:34 +00:00
|
|
|
label title
|
|
|
|
|
|
|
|
vbox:
|
|
|
|
add img xalign 0.5
|
|
|
|
|
|
|
|
text entry
|
|
|
|
|
2024-05-29 20:31:12 +00:00
|
|
|
textbutton confirm action Return(True)
|
2024-05-24 14:19:34 +00:00
|
|
|
|
|
|
|
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
|
2024-05-28 19:51:41 +00:00
|
|
|
easein_back 0.4 zoom 1.0 alpha 1.0
|
2024-05-24 14:19:34 +00:00
|
|
|
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)
|
2024-05-29 20:31:12 +00:00
|
|
|
yminimum 200
|
|
|
|
maximum (600, 450)
|
2024-05-24 14:19:34 +00:00
|
|
|
fit_first True
|
|
|
|
xfill False
|
|
|
|
yfill False
|
|
|
|
padding (50, 10)
|
|
|
|
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
|
2024-05-29 20:31:12 +00:00
|
|
|
ypos 30
|
2024-05-24 14:19:34 +00:00
|
|
|
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:
|
2024-05-29 20:31:12 +00:00
|
|
|
xalign 0.5
|
|
|
|
xoffset 0
|
|
|
|
ypos 0
|
|
|
|
xsize None
|
2024-05-24 14:19:34 +00:00
|
|
|
color "#fff"
|
|
|
|
outlines [(1, "#000000", 1, 1)]
|
|
|
|
hinting "bytecode"
|
2024-05-29 20:31:12 +00:00
|
|
|
size 16
|
|
|
|
xmaximum 500
|
2024-05-28 19:51:41 +00:00
|
|
|
|
|
|
|
style frame_button is button:
|
|
|
|
hover_background Frame(Image("gui/creamy_pumpkin_pie/choice_alt.png", oversample=4), 0, 4, 0, 4, tile=False)
|
2024-05-29 20:31:12 +00:00
|
|
|
xpadding 25
|
|
|
|
align (0.5, 1.0)
|
|
|
|
|
2024-05-28 19:51:41 +00:00
|
|
|
style frame_button_text is choice_text:
|
|
|
|
align (0.5, 0.5)
|