Add Fancy and Lock UI options, and fix an issue with fancy TGUI

This commit is contained in:
ShadowLarkens
2020-07-17 22:39:52 -07:00
parent 2992efb823
commit 2d98903cca
4 changed files with 36 additions and 11 deletions
+9 -3
View File
@@ -203,8 +203,8 @@
"window" = list(
"key" = window_key,
"size" = window_size,
"fancy" = FALSE, // user.client.prefs.tgui_fancy,
"locked" = FALSE, // user.client.prefs.tgui_lock,
"fancy" = user.client.prefs.tgui_fancy,
"locked" = user.client.prefs.tgui_lock,
),
"user" = list(
"name" = "[user]",
@@ -290,8 +290,14 @@
SStgui.update_uis(src_object)
return FALSE
switch(type)
if("ready", "pingReady")
if("ready")
initialized = TRUE
if("pingReply")
initialized = TRUE
if("suspend")
close(can_be_suspended = TRUE)
if("close")
close(can_be_suspended = FALSE)
if("log")
if(href_list["fatal"])
close(can_be_suspended = FALSE)
+4 -4
View File
@@ -47,10 +47,10 @@
// Build window options
var/options = "file=[id].html;can_minimize=0;auto_format=0;"
// Remove titlebar and resize handles for a fancy window
// if(client.prefs.tgui_fancy)
// options += "titlebar=0;can_resize=0;"
// else
options += "titlebar=1;can_resize=1;"
if(client.prefs.tgui_fancy)
options += "titlebar=0;can_resize=0;"
else
options += "titlebar=1;can_resize=1;"
// Generate page html
// TODO: Make this static
var/html = SStgui.basehtml