Shiptest 13 - Modules - TypesVar Details - Proc Details

tgui

Vars

basehtmlThe HTML base used for all UIs.
current_runA list of UIs scheduled to process
open_uisA list of open UIs
open_uis_by_srcA list of open UIs, grouped by src_object.

Procs

close_all_uispublic
close_uispublic
close_user_uispublic
force_close_all_windowspublic
force_close_windowpublic
get_open_uipublic
on_closeprivate
on_logoutprivate
on_openprivate
on_transferprivate
request_pooled_windowpublic
try_update_uipublic
update_uispublic
update_user_uispublic

Var Details

basehtml

The HTML base used for all UIs.

current_run

A list of UIs scheduled to process

open_uis

A list of open UIs

open_uis_by_src

A list of open UIs, grouped by src_object.

Proc Details

close_all_uis

public

Close all UIs regardless of their attachment to src_object.

return int The number of UIs closed.

close_uis

public

Close all UIs attached to src_object.

required src_object datum The object/datum which owns the UIs.

return int The number of UIs closed.

close_user_uis

public

Close all UIs belonging to a user.

required user mob The mob who opened/is using the UI. optional src_object datum If provided, only close UIs belonging this src_object.

return int The number of UIs closed.

force_close_all_windows

public

Force closes all tgui windows.

required user mob

force_close_window

public

Force closes the tgui window by window_id.

required user mob required window_id string

get_open_ui

public

Get a open UI given a user and src_object.

required user mob The mob who opened/is using the UI. required src_object datum The object/datum which owns the UI.

return datum/tgui The found UI.

on_close

private

Remove a UI from the list of open UIs.

required ui datum/tgui The UI to be removed.

return bool If the UI was removed or not.

on_logout

private

Handle client logout, by closing all their UIs.

required user mob The mob which logged out.

return int The number of UIs closed.

on_open

private

Add a UI to the list of open UIs.

required ui datum/tgui The UI to be added.

on_transfer

private

Handle clients switching mobs, by transferring their UIs.

required user source The client's original mob. required user target The client's new mob.

return bool If the UIs were transferred.

request_pooled_window

public

Requests a usable tgui window from the pool. Returns null if pool was exhausted.

required user mob return datum/tgui

try_update_ui

public

Try to find an instance of a UI, and push an update to it.

required user mob The mob who opened/is using the UI. required src_object datum The object/datum which owns the UI. optional ui datum/tgui The UI to be updated, if it exists. optional force_open bool If the UI should be re-opened instead of updated.

return datum/tgui The found UI.

update_uis

public

Update all UIs attached to src_object.

required src_object datum The object/datum which owns the UIs.

return int The number of UIs updated.

update_user_uis

public

Update all UIs belonging to a user.

required user mob The mob who opened/is using the UI. optional src_object datum If provided, only update UIs belonging this src_object.

return int The number of UIs updated.