mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Multiple minor updates to Nano.
Created new DNA Modifier Nano UI. Refactored the DNA Modifier code.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user