Adds hotkey to close all UIs (#93049)

This commit is contained in:
MrMelbert
2025-09-26 15:04:19 -05:00
committed by GitHub
parent ddb64b9fe6
commit bc91442dc4
2 changed files with 15 additions and 0 deletions

View File

@@ -28,6 +28,7 @@
#define COMSIG_KB_CLIENT_SCREENSHOT_DOWN "keybinding_client_screenshot_down" #define COMSIG_KB_CLIENT_SCREENSHOT_DOWN "keybinding_client_screenshot_down"
#define COMSIG_KB_CLIENT_FULLSCREEN_DOWN "keybinding_client_fullscreen_down" #define COMSIG_KB_CLIENT_FULLSCREEN_DOWN "keybinding_client_fullscreen_down"
#define COMSIG_KB_CLIENT_MINIMALHUD_DOWN "keybinding_client_minimalhud_down" #define COMSIG_KB_CLIENT_MINIMALHUD_DOWN "keybinding_client_minimalhud_down"
#define COMSIG_KB_CLIENT_CLOSEUI_DOWN "keybinding_client_closeui_down"
//Communication //Communication

View File

@@ -59,3 +59,17 @@
return return
user.mob.button_pressed_F12() user.mob.button_pressed_F12()
return TRUE return TRUE
/datum/keybinding/client/close_every_ui
hotkey_keys = list("Northwest") // HOME key
name = "close_every_ui"
full_name = "Close Open UIs"
description = "Closes all UI windows you have open."
keybind_signal = COMSIG_KB_CLIENT_CLOSEUI_DOWN
/datum/keybinding/client/close_every_ui/down(client/user, turf/target)
. = ..()
if(.)
return
SStgui.close_user_uis(user.mob)
return TRUE