NanoUI caching for cameras/crew manifest

This commit is contained in:
Markolie
2015-07-28 19:54:17 +02:00
parent c8b2f5e420
commit 154a282a0d
8 changed files with 64 additions and 72 deletions
+4 -1
View File
@@ -467,7 +467,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["convo_job"] = sanitize(c["job"])
break
if(mode==41)
data["manifest"] = data_core.get_manifest_json()
data_core.get_manifest_json()
if(mode==3)
@@ -499,12 +499,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["aircontents"] = list("reading" = 0)
data["manifest"] = list("__json_cache" = ManifestJSON)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "pda.tmpl", title, 630, 600)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window