mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-14 08:35:39 +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:
@@ -2,12 +2,14 @@
|
||||
/datum/admins/proc/player_panel_new()//The new one
|
||||
if (!usr.client.holder)
|
||||
return
|
||||
var/ui_scale = owner.prefs.read_preference(/datum/preference/toggle/ui_scale)
|
||||
var/dat = "<html><head><title>Admin Player Panel</title></head>"
|
||||
|
||||
//javascript, the part that does most of the work~
|
||||
dat += {"
|
||||
|
||||
<head>
|
||||
[!ui_scale && owner.window_scaling ? "<style>body {zoom: [100 / owner.window_scaling]%;}</style>" : ""]
|
||||
<script type='text/javascript'>
|
||||
|
||||
var locked_tabs = new Array();
|
||||
@@ -315,7 +317,10 @@
|
||||
</body></html>
|
||||
"}
|
||||
|
||||
usr << browse(dat, "window=players;size=600x480")
|
||||
var/window_size = "size=600x480"
|
||||
if(owner.window_scaling && ui_scale)
|
||||
window_size = "size=[600 * owner.window_scaling]x[400 * owner.window_scaling]"
|
||||
usr << browse(dat, "window=players;[window_size]")
|
||||
|
||||
//The old one
|
||||
/datum/admins/proc/player_panel_old()
|
||||
|
||||
@@ -83,6 +83,8 @@
|
||||
names = D.get_variables()
|
||||
//sleep(1)//For some reason, without this sleep, VVing will cause client to disconnect on certain objects. //VOREStation edit - commented out, replaced with spawn(0) above
|
||||
|
||||
var/ui_scale = prefs?.read_preference(/datum/preference/toggle/ui_scale)
|
||||
|
||||
var/list/variable_html = list()
|
||||
if (islist)
|
||||
var/list/L = D
|
||||
@@ -113,6 +115,7 @@
|
||||
font-size: 8pt;
|
||||
}
|
||||
</style>
|
||||
[!ui_scale && window_scaling ? "<style>body {zoom: [100 / window_scaling]%;}</style>" : ""]
|
||||
</head>
|
||||
<body onload='selectTextField()' onkeydown='return handle_keydown()' onkeyup='handle_keyup()'>
|
||||
<script type="text/javascript">
|
||||
@@ -277,7 +280,11 @@
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
src << browse(html, "window=variables[refid];size=475x650") //VOREStation edit end
|
||||
var/size_string = "size=475x650";
|
||||
if(ui_scale && window_scaling)
|
||||
size_string = "size=[475 * window_scaling]x[650 * window_scaling]"
|
||||
|
||||
src << browse(html, "window=variables[refid];[size_string]")
|
||||
|
||||
/client/proc/vv_update_display(datum/D, span, content)
|
||||
src << output("[span]:[content]", "variables\ref[D].browser:replace_span")
|
||||
|
||||
Reference in New Issue
Block a user