WTS/game/scripts/gui/misc.rpy

94 lines
1.9 KiB
Plaintext
Raw Normal View History

2022-05-16 23:48:22 +00:00
#
# Additional screens
#
init offset = -1
# Confirm screen
#
# The confirm screen is called when Ren'Py wants to ask the player a yes or no
# question.
#
# https://www.renpy.org/doc/html/screen_special.html#confirm
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 "frame"
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
xysize (500, 250)
2022-05-16 23:48:22 +00:00
vbox:
2024-05-24 14:19:34 +00:00
ypos 20
2022-05-16 23:48:22 +00:00
2024-05-24 14:19:34 +00:00
text message
2022-05-16 23:48:22 +00:00
hbox:
textbutton _("Yes") action yes_action
textbutton _("No") action no_action
## Right-click and escape answer "no".
key "game_menu" action no_action
# Skip indicator screen
#
# The skip_indicator screen is displayed to indicate that skipping is in
# progress.
#
# https://www.renpy.org/doc/html/screen_special.html#skip-indicator
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)]
# Notify screen
#
# The notify screen is used to show the player a message. (For example, when
# the game is quicksaved or a screenshot has been taken.)
#
# https://www.renpy.org/doc/html/screen_special.html#notify-screen
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