Skip to content

Commit

Permalink
Fixes screen alert tooltips getting stuck open (#5349)
Browse files Browse the repository at this point in the history
# About the pull request

Fixes #5344 by making alert tooltips close when the user's mouse exits
the alert.
(This is how it work on other codebases that I've checked, so I guess it
was just accidentally left out when alerts were ported here?)

# Explain why it's good for the game

Tooltips should be able to open *and* close.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: Fixed screen alert tooltips ('Buckled' indicator and stuff) getting
stuck open.
/:cl:
  • Loading branch information
SabreML authored Jan 1, 2024
1 parent 714476f commit ba63137
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/modules/maptext_alerts/screen_alerts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@
if(!QDELETED(src))
openToolTip(usr, src, params, title = name, content = desc, theme = alerttooltipstyle)

/atom/movable/screen/alert/MouseExited(location, control, params)
. = ..()
closeToolTip(usr)

/atom/movable/screen/alert/notify_action
name = "Notification"
desc = "A new notification. You can enter it."
Expand Down

0 comments on commit ba63137

Please sign in to comment.