Files
Bubberstation/code/controllers/subsystem/input.dm
SkyratBot 583a5e704a [MIRROR] Fullscreen, status bar hiding, chat input following the theme [MDB IGNORE] (#14555)
* Fullscreen, status bar hiding, chat input following the theme (#67987)

* Initial commit

* input is colored according to the theme

* removed unused setting

* Fullscreen, status bar hiding, chat input following the theme

Co-authored-by: Andrew <mt.forspam@gmail.com>
2022-06-27 02:15:25 +01:00

41 lines
1.1 KiB
Plaintext

SUBSYSTEM_DEF(input)
name = "Input"
wait = 1 //SS_TICKER means this runs every tick
init_order = INIT_ORDER_INPUT
init_stage = INITSTAGE_EARLY
flags = SS_TICKER
priority = FIRE_PRIORITY_INPUT
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
var/list/macro_set
/datum/controller/subsystem/input/Initialize()
setup_default_macro_sets()
initialized = TRUE
refresh_client_macro_sets()
return ..()
// This is for when macro sets are eventualy datumized
/datum/controller/subsystem/input/proc/setup_default_macro_sets()
macro_set = list(
"Any" = "\"KeyDown \[\[*\]\]\"",
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
"Tab" = "\".winset \\\"input.focus=true?map.focus=true:input.focus=true\\\"\"",
"Escape" = "Reset-Held-Keys",
)
// Badmins just wanna have fun ♪
/datum/controller/subsystem/input/proc/refresh_client_macro_sets()
var/list/clients = GLOB.clients
for(var/i in 1 to clients.len)
var/client/user = clients[i]
user.set_macros()
/datum/controller/subsystem/input/fire()
for(var/mob/user as anything in GLOB.keyloop_list)
user.focus?.keyLoop(user.client)