Files
Bubberstation/code/modules/tutorials/tutorial_skip.dm
SkyratBot cea0034a67 [MIRROR] Adds a "Remind me later" button for tutorials (#27832)
* Adds a "Remind me later" button for tutorials (#83064)

## About The Pull Request

Dismisses the tutorial when the button is pushed

## Why It's Good For The Game

Some tutorials may pop up at inopportune moments and this lets players
deal with that, as well as when they bug out
## Changelog
🆑
qol: Added a "Remind me later" button for tutorials
/🆑

---------

Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com>

* Adds a "Remind me later" button for tutorials

---------

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com>
2024-05-25 20:51:41 +02:00

36 lines
1.2 KiB
Plaintext

/atom/movable/screen/tutorial_skip
icon = 'icons/effects/alphacolors.dmi'
icon_state = "white"
screen_loc = "TOP,LEFT"
color = COLOR_NEARLY_ALL_BLACK
alpha = 0
mouse_opacity = MOUSE_OPACITY_OPAQUE
layer = TUTORIAL_INSTRUCTIONS_LAYER
var/atom/movable/screen/tutorial_skip_text/skip_text
/atom/movable/screen/tutorial_skip/Initialize(mapload, datum/hud/hud_owner)
. = ..()
transform = transform.Scale(9, 1)
skip_text = new(null, hud_owner)
vis_contents += skip_text
maptext = MAPTEXT_VCR_OSD_MONO("<span style='font-size: 10px; text-align: left'>Remind me later</span>")
animate(src, alpha = 245, time = 0.8 SECONDS, easing = SINE_EASING)
/atom/movable/screen/tutorial_skip/Destroy()
QDEL_NULL(skip_text)
return ..()
/atom/movable/screen/tutorial_skip_text
alpha = 0
layer = TUTORIAL_INSTRUCTIONS_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
maptext_height = 32
maptext_width = 200
maptext_x = 20
maptext_y = 9
/atom/movable/screen/tutorial_skip_text/Initialize(mapload, datum/hud/hud_owner)
. = ..()
var/newtext = MAPTEXT_VCR_OSD_MONO("<span style='font-size: 10px; text-align: left'>Remind me later</span>")
animate(src, alpha = 255, time = 0.5 SECONDS, maptext=newtext)