tgui cargo console

rewrite awful shuttle/cargo code a lot as well
This commit is contained in:
Bjorn Neergaard
2016-02-05 17:06:07 -06:00
parent 3511f20044
commit 9386602acf
25 changed files with 560 additions and 682 deletions
+7
View File
@@ -60,6 +60,13 @@
/datum/proc/ui_host()
return src // Default src.
/**
* global
*
* Used to track the current screen.
**/
/datum/var/ui_screen = "home"
/**
* global
*
+3 -14
View File
@@ -24,7 +24,6 @@
"can_close" = TRUE,
"auto_format" = FALSE
)
var/screen = "home" // The screen this UI is currently viewing (defaults to home).
var/style = "nanotrasen" // The style to be used for this UI.
var/interface // The interface (template) to be used for this UI.
var/autoupdate = TRUE // Update the UI every MC tick.
@@ -142,16 +141,6 @@
/datum/tgui/proc/set_window_options(list/window_options)
src.window_options = window_options
/**
* public
*
* Set the screen (page) for this UI.
*
* required screen string The screen to change to.
**/
/datum/tgui/proc/set_screen(screen)
src.screen = lowertext(screen)
/**
* public
*
@@ -224,7 +213,7 @@
var/list/config_data = list(
"title" = title,
"status" = status,
"screen" = screen,
"screen" = src_object.ui_screen,
"style" = style,
"interface" = interface,
"fancy" = user.client.prefs.tgui_fancy,
@@ -260,8 +249,8 @@
// Generate the JSON.
var/json = json_encode(json_data)
// Strip #255/improper.
json = replacetext(json, "\improper", "")
json = replacetext(json, "\proper", "")
json = replacetext(json, "\improper", "")
return json
/**
@@ -284,7 +273,7 @@
initialized = TRUE
if("tgui:view")
if(params["screen"])
screen = params["screen"]
src_object.ui_screen = params["screen"]
SStgui.update_uis(src_object)
if("tgui:link")
user << link(params["url"])