32 lines
14 KiB
HTML
32 lines
14 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/tgui - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="datum/tgui.html#var">Var Details</a> - <a href="datum/tgui.html#proc">Proc Details</a></header><main><h1>tgui <aside>/<a href="datum.html">datum</a>/<a href="datum/tgui.html">tgui</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L9"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 9"></a></h1><p>tgui datum (represents a UI).</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/tgui.html#var/autoupdate">autoupdate</a></th><td>Update the UI every MC tick.</td></tr><tr><th><a href="datum/tgui.html#var/closing">closing</a></th><td>Stops further updates when close() was called.</td></tr><tr><th><a href="datum/tgui.html#var/initialized">initialized</a></th><td>If the UI has been initialized yet.</td></tr><tr><th><a href="datum/tgui.html#var/interface">interface</a></th><td>The interface (template) to be used for this UI.</td></tr><tr><th><a href="datum/tgui.html#var/opened_at">opened_at</a></th><td>Time of opening the window.</td></tr><tr><th><a href="datum/tgui.html#var/src_object">src_object</a></th><td>The object which owns the UI.</td></tr><tr><th><a href="datum/tgui.html#var/state">state</a></th><td>Topic state used to determine status/interactability.</td></tr><tr><th><a href="datum/tgui.html#var/status">status</a></th><td>The status/visibility of the UI.</td></tr><tr><th><a href="datum/tgui.html#var/title">title</a></th><td>The title of te UI.</td></tr><tr><th><a href="datum/tgui.html#var/user">user</a></th><td>The mob who opened/is using the UI.</td></tr><tr><th><a href="datum/tgui.html#var/window">window</a></th><td>The window_id for browse() and onclose().</td></tr><tr><th><a href="datum/tgui.html#var/window_key">window_key</a></th><td>Key that is used for remembering the window geometry.</td></tr><tr><th><a href="datum/tgui.html#var/window_size">window_size</a></th><td>Deprecated: Window size.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/tgui.html#proc/New">New</a></th><td>public</td></tr><tr><th><a href="datum/tgui.html#proc/close">close</a></th><td>public</td></tr><tr><th><a href="datum/tgui.html#proc/get_payload">get_payload</a></th><td>private</td></tr><tr><th><a href="datum/tgui.html#proc/on_message">on_message</a></th><td>private</td></tr><tr><th><a href="datum/tgui.html#proc/open">open</a></th><td>public</td></tr><tr><th><a href="datum/tgui.html#proc/process">process</a></th><td>private</td></tr><tr><th><a href="datum/tgui.html#proc/process_status">process_status</a></th><td>private</td></tr><tr><th><a href="datum/tgui.html#proc/send_asset">send_asset</a></th><td>public</td></tr><tr><th><a href="datum/tgui.html#proc/send_full_update">send_full_update</a></th><td>public</td></tr><tr><th><a href="datum/tgui.html#proc/send_update">send_update</a></th><td>public</td></tr><tr><th><a href="datum/tgui.html#proc/set_autoupdate">set_autoupdate</a></th><td>public</td></tr><tr><th><a href="datum/tgui.html#proc/set_state">set_state</a></th><td>public</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/autoupdate"><aside class="declaration">var </aside>autoupdate <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L25"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 25"></a></h3><p>Update the UI every MC tick.</p><h3 id="var/closing"><aside class="declaration">var </aside>closing <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L31"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 31"></a></h3><p>Stops further updates when close() was called.</p><h3 id="var/initialized"><aside class="declaration">var </aside>initialized <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L27"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 27"></a></h3><p>If the UI has been initialized yet.</p><h3 id="var/interface"><aside class="declaration">var </aside>interface <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L23"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 23"></a></h3><p>The interface (template) to be used for this UI.</p><h3 id="var/opened_at"><aside class="declaration">var </aside>opened_at <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L29"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 29"></a></h3><p>Time of opening the window.</p><h3 id="var/src_object"><aside class="declaration">var </aside>src_object <aside>– /<a href="datum.html">datum</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L13"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 13"></a></h3><p>The object which owns the UI.</p><h3 id="var/state"><aside class="declaration">var </aside>state <aside>– /<a href="datum.html">datum</a>/<a href="datum/ui_state.html">ui_state</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L35"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 35"></a></h3><p>Topic state used to determine status/interactability.</p><h3 id="var/status"><aside class="declaration">var </aside>status <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L33"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 33"></a></h3><p>The status/visibility of the UI.</p><h3 id="var/title"><aside class="declaration">var </aside>title <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L15"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 15"></a></h3><p>The title of te UI.</p><h3 id="var/user"><aside class="declaration">var </aside>user <aside>– /<a href="mob.html">mob</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L11"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 11"></a></h3><p>The mob who opened/is using the UI.</p><h3 id="var/window"><aside class="declaration">var </aside>window <aside>– /<a href="datum.html">datum</a>/<a href="datum/tgui_window.html">tgui_window</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L17"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 17"></a></h3><p>The window_id for browse() and onclose().</p><h3 id="var/window_key"><aside class="declaration">var </aside>window_key <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L19"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 19"></a></h3><p>Key that is used for remembering the window geometry.</p><h3 id="var/window_size"><aside class="declaration">var </aside>window_size <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L21"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 21"></a></h3><p>Deprecated: Window size.</p><h2 id="proc">Proc Details</h2><h3 id="proc/New">New<aside>(/<a href="mob.html">mob</a>/user, /<a href="datum.html">datum</a>/src_object, interface, title, ui_x, ui_y) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L51"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 51"></a></aside></h3><p>public</p>
|
||
<p>Create a new UI.</p>
|
||
<p>required user mob The mob who opened/is using the UI.
|
||
required src_object datum The object or datum which owns the UI.
|
||
required interface string The interface used to render the UI.
|
||
optional title string The title of the UI.
|
||
optional ui_x int Deprecated: Window width.
|
||
optional ui_y int Deprecated: Window height.</p>
|
||
<p>return datum/tgui The requested UI.</p><h3 id="proc/close"><aside class="declaration">proc </aside>close<aside>(can_be_suspended) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L121"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 121"></a></aside></h3><p>public</p>
|
||
<p>Close the UI.</p>
|
||
<p>optional can_be_suspended bool</p><h3 id="proc/get_payload"><aside class="declaration">proc </aside>get_payload<aside>(custom_data, with_data, with_static_data) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L212"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 212"></a></aside></h3><p>private</p>
|
||
<p>Package the data to send to the UI, as JSON.</p>
|
||
<p>return list</p><h3 id="proc/on_message"><aside class="declaration">proc </aside>on_message<aside>(type, /list/payload, /list/href_list) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L292"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 292"></a></aside></h3><p>private</p>
|
||
<p>Callback for handling incoming tgui messages.</p><h3 id="proc/open"><aside class="declaration">proc </aside>open<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L78"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 78"></a></aside></h3><p>public</p>
|
||
<p>Open this UI (and initialize it with data).</p>
|
||
<p>return bool - TRUE if a new pooled window is opened, FALSE in all other situations including if a new pooled window didn't open because one already exists.</p><h3 id="proc/process"><aside class="parent"><a title="/datum" href="datum.html#proc/process">↑</a></aside>process<aside>(delta_time, force) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L250"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 250"></a></aside></h3><p>private</p>
|
||
<p>Run an update cycle for this UI. Called internally by SStgui
|
||
every second or so.</p><h3 id="proc/process_status"><aside class="declaration">proc </aside>process_status<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L282"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 282"></a></aside></h3><p>private</p>
|
||
<p>Updates the status, and returns TRUE if status has changed.</p><h3 id="proc/send_asset"><aside class="declaration">proc </aside>send_asset<aside>(/<a href="datum.html">datum</a>/<a href="datum/asset.html">asset</a>/asset) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L167"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 167"></a></aside></h3><p>public</p>
|
||
<p>Makes an asset available to use in tgui.</p>
|
||
<p>required asset datum/asset</p>
|
||
<p>return bool - true if an asset was actually sent</p><h3 id="proc/send_full_update"><aside class="declaration">proc </aside>send_full_update<aside>(custom_data, force) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L180"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 180"></a></aside></h3><p>public</p>
|
||
<p>Send a full update to the client (includes static data).</p>
|
||
<p>optional custom_data list Custom data to send instead of ui_data.
|
||
optional force bool Send an update even if UI is not interactive.</p><h3 id="proc/send_update"><aside class="declaration">proc </aside>send_update<aside>(custom_data, force) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L197"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 197"></a></aside></h3><p>public</p>
|
||
<p>Send a partial update to the client (excludes static data).</p>
|
||
<p>optional custom_data list Custom data to send instead of ui_data.
|
||
optional force bool Send an update even if UI is not interactive.</p><h3 id="proc/set_autoupdate"><aside class="declaration">proc </aside>set_autoupdate<aside>(autoupdate) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L145"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 145"></a></aside></h3><p>public</p>
|
||
<p>Enable/disable auto-updating of the UI.</p>
|
||
<p>required value bool Enable/disable auto-updating.</p><h3 id="proc/set_state"><aside class="declaration">proc </aside>set_state<aside>(/<a href="datum.html">datum</a>/<a href="datum/ui_state.html">ui_state</a>/state) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/modules/tgui/tgui.dm#L155"><img src="git.png" width="16" height="16" title="code/modules/tgui/tgui.dm 155"></a></aside></h3><p>public</p>
|
||
<p>Replace current ui.state with a new one.</p>
|
||
<p>required state datum/ui_state/state Next state</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html> |