mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
NanoUI changes from Faerdan
Conflicts: code/game/dna/dna_modifier.dm code/game/machinery/cryo.dm code/modules/nano/nanomanager.dm code/modules/nano/nanoui.dm code/modules/reagents/Chemistry-Machinery.dm
This commit is contained in:
@@ -25,11 +25,11 @@
|
||||
* @return /nanoui Returns the found ui, for null if none exists
|
||||
*/
|
||||
/datum/nanomanager/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data)
|
||||
if (isnull(ui)) // no ui has been passed, so we'll search for one
|
||||
if (!ui) // no ui has been passed, so we'll search for one
|
||||
{
|
||||
ui = get_open_ui(user, src_object, ui_key)
|
||||
ui = get_open_ui(user, src, ui_key)
|
||||
}
|
||||
if (!isnull(ui))
|
||||
if (ui)
|
||||
// The UI is already open so push the data to it
|
||||
ui.push_data(data)
|
||||
return ui
|
||||
|
||||
@@ -302,7 +302,11 @@ nanoui is used to open and update nano browser uis
|
||||
<div id='uiWrapper'>
|
||||
[title ? "<div id='uiTitleWrapper'><div id='uiStatusIcon' class='icon24 uiStatusGood'></div><div id='uiTitle'>[title]</div><div id='uiTitleFluff'></div></div>" : ""]
|
||||
<div id='uiContent'>
|
||||
<<<<<<< HEAD
|
||||
<div id='uiNoJavaScript'>Initiating...</div>
|
||||
=======
|
||||
<noscript><div id='uiNoJavaScript'>Your browser does not have JavaScript enabled. Please enable JavaScript, then restart SS13.</div></noscript>
|
||||
>>>>>>> b393ea6... NanoUI changes from Faerdan
|
||||
"}
|
||||
|
||||
/**
|
||||
|
||||
@@ -149,10 +149,9 @@
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if (!ui)
|
||||
|
||||
// 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, "chem_dispenser.tmpl", ui_title, 380, 650)
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 370, 605)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
|
||||
Reference in New Issue
Block a user