Escape menu improvements (#91397)

Removes the blur of the escape menu so players can sorta see what's
going on in their game while going through, so they can react in case
something's happening while they're in menu.
Changes the font of the escape menu so it's no longer the LISA font
Makes the title only show up on the home menu, so being on the suicide
panel wont show you "another day on space station 13".
Moves the 'back' button on the suicide menu to the top left.

![image](https://github.com/user-attachments/assets/4d527059-38ab-4330-9e8c-f373e0942777)

![image](https://github.com/user-attachments/assets/23f0f230-f901-480d-9426-9ca8f33493f9)

This hopes to make the escape menu a little more easy to go through,
removing some obstruction of your game's screen so you can see what's
happening around you, and give a little generic part of submenus in case
we add more (which I do have at least one planned).

🆑
qol: The escape menu no longer blurs the game in the background.
qol: The escape menu now has a more readable font, and the escape menu's
back button is now smaller and in the corner.
/🆑
This commit is contained in:
John Willard
2025-06-05 19:50:34 -04:00
committed by Roxy
parent 12992ad5a3
commit ac94a14822
12 changed files with 285 additions and 283 deletions
@@ -0,0 +1,129 @@
/atom/movable/screen/escape_menu/home_button/admin_help
VAR_PRIVATE
current_blink = FALSE
is_blinking = FALSE
last_blink_time = 0
blink_interval = 0.4 SECONDS
/atom/movable/screen/escape_menu/home_button/admin_help/Initialize(
mapload,
datum/hud/hud_owner,
datum/escape_menu/escape_menu,
button_text,
offset,
on_click_callback,
)
. = ..()
RegisterSignal(escape_menu.client, COMSIG_ADMIN_HELP_RECEIVED, PROC_REF(on_admin_help_received))
RegisterSignals(escape_menu.client, list(COMSIG_CLIENT_VERB_ADDED, COMSIG_CLIENT_VERB_REMOVED), PROC_REF(on_client_verb_changed))
var/datum/admin_help/current_ticket = escape_menu.client?.current_ticket
if (!isnull(current_ticket))
connect_ticket(current_ticket)
if (!current_ticket?.player_replied)
begin_processing()
/atom/movable/screen/escape_menu/home_button/admin_help/Click(location, control, params)
if (!enabled())
return
QDEL_IN(escape_menu, 0)
var/client/client = escape_menu.client
if (has_open_adminhelp())
client?.view_latest_ticket()
else
client?.adminhelp()
/atom/movable/screen/escape_menu/home_button/admin_help/proc/has_open_adminhelp()
var/client/client = escape_menu.client
var/datum/admin_help/current_ticket = client?.current_ticket
// This is null with a closed ticket.
// This is okay since the View Latest Ticket panel already tells you if your ticket is closed, intentionally.
if (isnull(current_ticket))
return FALSE
// If we sent a ticket, but nobody has responded, send another one instead.
// Not worth opening a menu when there's nothing to read, you're only going to want to send.
if (length(current_ticket.admins_involved - client?.ckey) == 0)
return FALSE
return TRUE
/atom/movable/screen/escape_menu/home_button/admin_help/proc/on_admin_help_received()
SIGNAL_HANDLER
begin_processing()
/atom/movable/screen/escape_menu/home_button/admin_help/proc/on_client_verb_changed(client/source, list/verbs_changed)
SIGNAL_HANDLER
if (/client/verb/adminhelp in verbs_changed)
home_button_text.update_text()
/atom/movable/screen/escape_menu/home_button/admin_help/proc/begin_processing()
if (is_blinking)
return
is_blinking = TRUE
current_blink = TRUE
START_PROCESSING(SSescape_menu, src)
home_button_text.update_text()
/atom/movable/screen/escape_menu/home_button/admin_help/proc/end_processing()
if (!is_blinking)
return
is_blinking = FALSE
current_blink = FALSE
STOP_PROCESSING(SSescape_menu, src)
home_button_text.update_text()
/atom/movable/screen/escape_menu/home_button/admin_help/proc/connect_ticket(datum/admin_help/admin_help)
ASSERT(istype(admin_help))
RegisterSignal(admin_help, COMSIG_ADMIN_HELP_REPLIED, PROC_REF(on_admin_help_replied))
/atom/movable/screen/escape_menu/home_button/admin_help/proc/on_admin_help_replied()
SIGNAL_HANDLER
end_processing()
/atom/movable/screen/escape_menu/home_button/admin_help/enabled()
if (!..())
return FALSE
if (!has_open_adminhelp())
return /client/verb/adminhelp in escape_menu.client?.verbs
return TRUE
/atom/movable/screen/escape_menu/home_button/admin_help/process(seconds_per_tick)
if (world.time - last_blink_time < blink_interval)
return
current_blink = !current_blink
last_blink_time = world.time
home_button_text.update_text()
/atom/movable/screen/escape_menu/home_button/admin_help/text_color()
if (!enabled())
return ..()
return current_blink ? "red" : ..()
/atom/movable/screen/escape_menu/home_button/admin_help/MouseEntered(location, control, params)
. = ..()
if (is_blinking)
openToolTip(usr, src, params, content = "An admin is trying to talk to you!")
/atom/movable/screen/escape_menu/home_button/admin_help/MouseExited(location, control, params)
. = ..()
closeToolTip(usr)