Merge pull request #5219 from VOREStation/vplk-nanoui-multi-template

NanoUI multiple templates example.
This commit is contained in:
Atermonera
2018-05-03 11:12:56 -07:00
committed by GitHub
9 changed files with 262 additions and 280 deletions
+2 -1
View File
@@ -653,8 +653,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400, state = inventory_state)
// add templates for screens in common with communicator.
ui.add_template("atmosphericScan", "atmospheric_scan.tmpl")
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
@@ -118,6 +118,8 @@
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "communicator.tmpl", "Communicator", 475, 700, state = key_state)
// add templates for screens in common with communicator.
ui.add_template("atmosphericScan", "atmospheric_scan.tmpl")
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window