Multiple minor updates to Nano.

Created new DNA Modifier Nano UI.

Refactored the DNA Modifier code.
This commit is contained in:
Mark Aherne (Faerdan)
2013-09-19 01:39:59 +01:00
parent 9378ce2402
commit e0924bf4ab
15 changed files with 1494 additions and 1401 deletions

View File

@@ -31,11 +31,12 @@
* ui_interact is currently defined for /atom/movable
*
* @param user /mob The mob who is interacting with this ui
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
*
* @return nothing
*/
/atom/movable/proc/ui_interact(mob/user, ui_key = "main")
/atom/movable/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
return
// Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob

View File

@@ -387,6 +387,7 @@ nanoui is used to open and update nano browser uis
return // Cannot update UI, no visibility
data = add_default_data(data)
//user << list2json(data) // used for debugging
user << output(list2params(list(list2json(data))),"[window_id].browser:receiveUpdateData")
/**
@@ -414,7 +415,7 @@ nanoui is used to open and update nano browser uis
*/
/datum/nanoui/proc/process(update = 0)
if (status && (update || is_auto_updating))
src_object.ui_interact(user, ui_key) // Update the UI (update_status() is called whenever a UI is updated)
src_object.ui_interact(user, ui_key, src) // Update the UI (update_status() is called whenever a UI is updated)
else
update_status(1) // Not updating UI, so lets check here if status has changed