Admin UI improvements (#20048)

* admin UI improvement

* browser_ui_2

* OptimisAAtion

* a

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>

* AA fix 2

---------

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
S34N
2023-02-13 18:56:39 +00:00
committed by GitHub
parent a7bd9d6bde
commit f5db427bc8
6 changed files with 149 additions and 151 deletions

View File

@@ -9,7 +9,13 @@ GLOBAL_LIST_INIT(create_object_forms, list(/obj, /obj/structure, /obj/machinery,
GLOB.create_object_html = replacetext(GLOB.create_object_html, "$ATOM$", "Object")
GLOB.create_object_html = replacetext(GLOB.create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(replacetext(GLOB.create_object_html, "/* ref src */", UID()), "window=create_object;size=425x475")
var/datum/browser/popup = new(user, "create_obj", "<div align='center'>Create Object</div>", 500, 550)
var/unique_content = GLOB.create_object_html
unique_content = replacetext(unique_content, "/* ref src */", UID())
popup.set_content(unique_content)
popup.set_window_options("can_close=1;can_minimize=0;can_maximize=1;can_resize=1")
popup.open()
onclose(user, "create_obj")
/datum/admins/proc/quick_create_object(mob/user)
var/path = input("Select the path of the object you wish to create.", "Path", /obj) in GLOB.create_object_forms
@@ -22,4 +28,10 @@ GLOBAL_LIST_INIT(create_object_forms, list(/obj, /obj/structure, /obj/machinery,
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
GLOB.create_object_forms[path] = html_form
user << browse(replacetext(html_form, "/* ref src */", UID()), "window=qco[path];size=425x475")
var/datum/browser/popup = new(user, "qco[path]", "<div align='center'>Quick Create [path]</div>", 500, 550)
var/unique_content = html_form
unique_content = replacetext(unique_content, "/* ref src */", UID())
popup.set_content(unique_content)
popup.set_window_options("can_close=1;can_minimize=0;can_maximize=1;can_resize=1")
popup.open()
onclose(user, "qco[path]")