mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-14 16:46:28 +01:00
[TGUI v6] Migration to CSS Variables, styles refactor & React 19 (#17487)
* Initial Port of tg's tgui 2.0 * initial * first UI fixes * fix retro theme * rd console * wiki theme * better tgui say handling * Ui scaling port * smaller gap * guh * reset subcats on main cat change * blink a bit later * tofixed * fixed * currently not fully supported * increase that * fix powermonitor chart * typescript up * tgui core up
This commit is contained in:
@@ -180,3 +180,6 @@
|
||||
|
||||
/// Token used for the external chatlog api. Only valid for the current round.
|
||||
var/chatlog_token
|
||||
|
||||
/// The DPI scale of the client. 1 is equivalent to 100% window scaling, 2 will be 200% window scaling
|
||||
var/window_scaling
|
||||
|
||||
@@ -296,9 +296,12 @@
|
||||
)
|
||||
addtimer(CALLBACK(src, PROC_REF(check_panel_loaded)), 30 SECONDS)
|
||||
|
||||
INVOKE_ASYNC(src, PROC_REF(acquire_dpi))
|
||||
|
||||
tgui_panel.initialize()
|
||||
|
||||
// Initialize tgui panel
|
||||
tgui_say.initialize()
|
||||
tgui_panel.initialize()
|
||||
|
||||
connection_time = world.time
|
||||
connection_realtime = world.realtime
|
||||
@@ -813,6 +816,10 @@
|
||||
SEND_SIGNAL(src, COMSIG_CLIENT_CLICK, object, location, control, params, usr)
|
||||
. = ..()
|
||||
|
||||
/// This grabs the DPI of the user per their skin
|
||||
/client/proc/acquire_dpi()
|
||||
window_scaling = text2num(winget(src, null, "dpi"))
|
||||
|
||||
#undef ADMINSWARNED_AT
|
||||
#undef CURRENT_MINUTE
|
||||
#undef CURRENT_SECOND
|
||||
|
||||
@@ -114,3 +114,16 @@
|
||||
|
||||
/datum/preference/text/preset_colors/apply_to_client(client/client, value)
|
||||
return
|
||||
|
||||
/datum/preference/toggle/ui_scale
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "ui_scale"
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
default_value = FALSE // Set to true once lobby screen is migrated to tgui and browse are replaced with datum browser
|
||||
|
||||
/datum/preference/toggle/ui_scale/apply_to_client(client/client, value)
|
||||
if(!istype(client))
|
||||
return
|
||||
|
||||
INVOKE_ASYNC(client, TYPE_VERB_REF(/client, refresh_tgui))
|
||||
client.tgui_say?.load()
|
||||
|
||||
Reference in New Issue
Block a user