Files
Bubberstation/code/modules/status_bar/status_bar.dm
SkyratBot 00fae761a3 [MIRROR] Status Bar: Reloaded: Revengeance - Back to Perfection (#4023)
* Status Bar: Reloaded: Revengeance - Back to Perfection (#57531)

* Status Bar: Reloaded: Revengeance - Back to Perfection

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-03-09 17:32:14 +00:00

21 lines
544 B
Plaintext

/*!
* Copyright (c) 2021 Aleksej Komarov
* SPDX-License-Identifier: MIT
*/
/client/var/status_bar_prev_text = ""
/**
* Set status bar text for the provided `target`.
*
* Target can be either of `/client` or `/mob`.
*/
/proc/status_bar_set_text(target, text)
var/client/client = CLIENT_FROM_VAR(target)
// Stop a winset call if text didn't change.
if(!client || client.status_bar_prev_text == text)
return
client.status_bar_prev_text = text
winset(client, "mapwindow.status_bar",
"text=[url_encode(text)]&is-visible=[!!text]")