[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:
Kashargul
2025-04-08 22:49:38 +02:00
committed by GitHub
parent e90a7a554a
commit d18cd11713
138 changed files with 2624 additions and 1987 deletions
+14 -2
View File
@@ -71,6 +71,14 @@
for (file in stylesheets)
head_content += "<link rel='stylesheet' type='text/css' href='[SSassets.transport.get_asset_url(file)]'>"
if(user.client?.window_scaling && user.client?.window_scaling != 1 && !user.client?.prefs.read_preference(/datum/preference/toggle/ui_scale) && width && height)
head_content += {"
<style>
body {
zoom: [100 / user.client?.window_scaling]%;
}
</style>
"}
for (file in scripts)
head_content += "<script type='text/javascript' src='[SSassets.transport.get_asset_url(file)]'></script>"
@@ -108,8 +116,12 @@
to_chat(user, span_userdanger("The [title] browser you tried to open failed a sanity check! Please report this on GitHub!"))
return
var/window_size = ""
if (width && height)
window_size = "size=[width]x[height];"
if(width && height)
if(user.client?.prefs?.read_preference(/datum/preference/toggle/ui_scale))
var/scaling = user.client.window_scaling
window_size = "size=[width * scaling]x[height * scaling];"
else
window_size = "size=[width]x[height];"
var/datum/asset/simple/namespaced/common/common_asset = get_asset_datum(/datum/asset/simple/namespaced/common)
common_asset.send(user)
if (stylesheets.len)