Moar nanoUI runtime fixes

This commit is contained in:
ZomgPonies
2013-11-30 18:18:45 -05:00
parent d6c519ec20
commit 03f9ef0903
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -1,5 +1,5 @@
// This file contains all Nano procs/definitions for external classes/objects
// This file contains all Nano procs/definitions for external classes/objects
/**
* Called when a Nano UI window is closed
* This is how Nano handles closed windows
@@ -13,9 +13,9 @@
var/datum/nanoui/ui = locate(uiref)
if (ui)
if (istype(ui))
ui.close()
if(ui.ref)
var/href = "close=1"
src.Topic(href, params2list(href), ui.ref) // this will direct to the atom's Topic() proc via client.Topic()
@@ -31,13 +31,13 @@
* 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", var/datum/nanoui/ui = null)
return
// Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob
/mob/var/list/open_uis = list()
+1 -1
View File
@@ -413,7 +413,7 @@ nanoui is used to open and update nano browser uis
if (status != STATUS_INTERACTIVE || user != usr) // If UI is not interactive or usr calling Topic is not the UI user
return
if (src_object.Topic(href, href_list))
if (src_object && src_object.Topic(href, href_list))
nanomanager.update_uis(src_object) // update all UIs attached to src_object
/**