2022-05-16 23:48:22 +00:00
|
|
|
transform popup_animation(time=4.0, xx=-200):
|
2023-11-18 04:00:01 +00:00
|
|
|
xoffset xx
|
|
|
|
linear 0.5 xoffset absolute(0)
|
|
|
|
pause time
|
|
|
|
linear 0.5 xoffset absolute(xx)
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2023-06-28 16:47:38 +00:00
|
|
|
screen popup_window(msg="", xpos=0, ypos=60):
|
2022-05-16 23:48:22 +00:00
|
|
|
tag popup_window
|
|
|
|
zorder 100
|
|
|
|
|
|
|
|
style_prefix gui.theme()
|
|
|
|
|
|
|
|
timer 5.0 action Hide("popup_window")
|
|
|
|
frame:
|
|
|
|
at popup_animation
|
|
|
|
pos (xpos, ypos)
|
|
|
|
|
2023-06-28 16:47:38 +00:00
|
|
|
text msg align (0.5, 0.5) size 12
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-05-03 17:24:43 +00:00
|
|
|
label give_reward(text=_("You found something!"), gift="interface/icons/box_blue_2.webp", sound=True):
|
2022-05-16 23:48:22 +00:00
|
|
|
if sound:
|
2023-03-11 22:01:39 +00:00
|
|
|
play sound "sounds/win2.ogg"
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
show screen gift(gift)
|
|
|
|
show screen notes
|
|
|
|
with d3
|
|
|
|
|
2023-11-15 22:41:29 +00:00
|
|
|
"[text!it]"
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
hide screen gift
|
|
|
|
hide screen notes
|
|
|
|
with d3
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
label modal_popup(title, entry, img=None, confirm="Ok"):
|
|
|
|
$ disable_game_menu()
|
2023-03-11 22:01:39 +00:00
|
|
|
play sound "sounds/pop01.ogg"
|
2022-05-16 23:48:22 +00:00
|
|
|
call screen modal_popup(title, entry, img, confirm)
|
|
|
|
$ enable_game_menu()
|
|
|
|
return
|
|
|
|
|
|
|
|
screen modal_popup(title, entry, img, confirm):
|
|
|
|
modal True
|
|
|
|
|
|
|
|
add "gui_fade"
|
|
|
|
|
|
|
|
frame:
|
|
|
|
style_prefix gui.theme()
|
|
|
|
xsize 518
|
|
|
|
align (0.5, 0.5)
|
|
|
|
padding (12 + 6, 6, 12 + 6, 12 + 6)
|
|
|
|
|
|
|
|
vbox:
|
|
|
|
spacing 12
|
|
|
|
first_spacing 0
|
|
|
|
|
|
|
|
fixed:
|
|
|
|
ysize 24
|
|
|
|
add gui.format("interface/achievements/{}/highlight.webp") xalign 0.5
|
|
|
|
add gui.format("interface/achievements/{}/spacer.webp") align (0.5, 1.0)
|
|
|
|
text title size 16 xalign 0.5 yalign 0.5
|
|
|
|
|
|
|
|
if img and renpy.loadable(img):
|
|
|
|
add img xalign 0.5
|
|
|
|
|
|
|
|
text entry size 12
|
|
|
|
|
|
|
|
textbutton confirm align (1.0, 1.0) action Return(True)
|