Function; UI_SetElementEnabled - HWRM/KarosGraveyard GitHub Wiki

UI_SetElementEnabled(screen_name, element_name, enabled)

Description

Enables or disables the named UI element belonging to the named 'screen'.

The named screen should be defined somewhere and loaded in ui/newui/uisettings.lua (see newmainmenu as an example).

Note: A 'screen' is simply a collection of UI elements, not necessarily a screen-covering page as you might imagine.

Example

-- 'MyCoolScreen' is a UI screen defined somewhere in `ui/newui`,
-- 'NeatButton' is an element defined in that sheet
UI_SetElementEnabled("MyCoolScreen", "NeatButton", 1);

Arguments

Param Type Description
screen_name string A screen (somewhere in ui/newui).
element_name string A UI element defined in the given stylesheet.
enabled number Either 0 or 1

Returns

nil

Related Pages