nanoui ui_interact -> nanoui_ui_interact

This commit is contained in:
Letter N
2020-11-25 09:52:09 +08:00
parent 4fca2ac7e3
commit dece5cc3fb
174 changed files with 423 additions and 400 deletions
@@ -119,7 +119,7 @@
active_program = null
var/mob/user = usr
if(user && istype(user))
ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
nano_ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
update_icon()
// Returns 0 for No Signal, 1 for Low Signal and 2 for Good Signal. 3 is for wired connection (always-on)
@@ -154,7 +154,7 @@
run_program(autorun.stored_data)
if(user)
ui_interact(user)
nano_ui_interact(user)
/obj/item/modular_computer/proc/minimize_program(mob/user)
if(!active_program || !processor_unit)
@@ -166,7 +166,7 @@
active_program = null
update_icon()
if(istype(user))
ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
nano_ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
/obj/item/modular_computer/proc/run_program(prog)
@@ -266,4 +266,4 @@
if(autorun.stored_data == program)
autorun.stored_data = null
else
autorun.stored_data = program
autorun.stored_data = program
@@ -99,7 +99,7 @@
/obj/item/modular_computer/attack_ghost(var/mob/observer/ghost/user)
if(enabled)
ui_interact(user)
nano_ui_interact(user)
else if(check_rights(R_ADMIN, 0, user))
var/response = alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", "Yes", "No")
if(response == "Yes")
@@ -116,7 +116,7 @@
// On-click handling. Turns on the computer if it's off and opens the GUI.
/obj/item/modular_computer/attack_self(var/mob/user)
if(enabled && screen_on)
ui_interact(user)
nano_ui_interact(user)
else if(!enabled && screen_on)
turn_on(user)
@@ -197,4 +197,4 @@
return
..()
..()
@@ -1,5 +1,5 @@
// Operates NanoUI
/obj/item/modular_computer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/item/modular_computer/nano_ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!screen_on || !enabled)
if(ui)
ui.close()
@@ -13,7 +13,7 @@
if(active_program)
if(ui) // This is the main laptop screen. Since we are switching to program's UI close it for now.
ui.close()
active_program.ui_interact(user)
active_program.nano_ui_interact(user)
return
// We are still here, that means there is no program loaded. Load the BIOS/ROM/OS/whatever you want to call it.
@@ -152,4 +152,4 @@
data["PC_stationtime"] = stationtime2text()
data["PC_hasheader"] = 1
data["PC_showexitprogram"] = active_program ? 1 : 0 // Hides "Exit Program" button on mainscreen
return data
return data