-
Notifications
You must be signed in to change notification settings - Fork 20
The user interface library renders widgets over the game window using an immediate-mode GUI.
local ui = require('ui')
The ui
table has the following entries:
// TypeScript formatted function definition
function libname.tablename.entry1(param1 : type1, param2 : type2 = 'default_value') : return_type
param1 type1
Description of parameter 1
param2 type2 [default: default_value
]
Indicates the source of the command.
-- Lua example if necessary
entry1 return_type
Description of whatever the function returns.
Renders a graphical window that contains other widgets and is configured with based on optional configuration parameters defined in the state table.
function ui.window(id : string, state : window_state, fn : function) : window_state, boolean
id string
Unique string identifier for the window.
state window_state
A table containing the configuration state of the window.
fn function
The function that defines the UI widgets drawn within the window.
Note: Widgets created inside a window are positioned relative to the extents of the window, not the entire game screen as with widgets created directly inside the ui.display function.
Description of the function that is the first table entry.