WTS/game/scripts/gui/misc.rpy

76 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2022-05-16 23:48:22 +00:00
init offset = -1
screen confirm(message, yes_action=Return(True), no_action=Return(False)):
modal True
2024-05-24 14:19:34 +00:00
layer "interface"
zorder 5
style_prefix "confirm"
2022-05-16 23:48:22 +00:00
2024-05-24 14:19:34 +00:00
add "gui_fade_both" at gui_fade
2022-05-16 23:48:22 +00:00
frame:
2024-05-24 14:19:34 +00:00
at gui_modal_popup
2022-05-16 23:48:22 +00:00
vbox:
2024-06-15 16:37:31 +00:00
text message:
text_align 0.5
2022-05-16 23:48:22 +00:00
hbox:
textbutton _("Yes") action yes_action
textbutton _("No") action no_action
key "game_menu" action no_action
style confirm_frame is frame
style confirm_vbox is frame_vbox
style confirm_hbox:
fit_first True
align (0.5, 1.0)
spacing 25
style confirm_button is frame_button
style confirm_button_text is frame_button_text
style confirm_text is frame_text:
size 20
2022-05-16 23:48:22 +00:00
screen skip_indicator():
zorder 100
text "{unicode}{size=66}▶▶{/size}{/unicode}\nSkipping":
at blink
style "skip_text"
style skip_text is default:
size 22
text_align 0.5
pos (50, 50)
color "#fff"
outlines [(1, "#00000080", 1, 0)]
screen notify(message):
layer "interface"
sensitive False
frame at notify_appear:
align (0.0, 1.0)
text message: # or "[message!tq]"
color "#fff"
outlines [(1, "#00000080", 1, 0)]
timer 3.25 action Hide("notify")
transform notify_appear:
on show:
alpha 0
linear .25 alpha 1.0
on hide:
linear .5 alpha 0.0
style notify_text is gui_text
style notify_frame is empty:
background Frame("gui/notify.png")
padding (4, 4, 4, 4)
style notify_text:
size 14