Class UIControlsService
Util class for UI controls.
Inheritance
System.Object
UIControlsService
Syntax
public static class UIControlsService
Methods
AddOnClickCallback(ComponentSystem, Entity, EventCallback)
Sets the callback that is called when the control is clicked.
Declaration
public static int AddOnClickCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
Entity |
uiControl |
|
EventCallback |
callback |
|
Returns
Type |
Description |
System.Int32 |
|
AddOnDownCallback(ComponentSystem, Entity, EventCallback)
Sets the callback that is called when the control is pressed.
Declaration
public static int AddOnDownCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
Entity |
uiControl |
|
EventCallback |
callback |
|
Returns
Type |
Description |
System.Int32 |
|
AddOnEnterCallback(ComponentSystem, Entity, EventCallback)
Sets the callback that is called when the mouse cursor enters the control's bounds.
Declaration
public static int AddOnEnterCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
Entity |
uiControl |
|
EventCallback |
callback |
|
Returns
Type |
Description |
System.Int32 |
|
AddOnLeaveCallback(ComponentSystem, Entity, EventCallback)
Sets the callback that is called when the mouse cursor leaves the control's bounds.
Declaration
public static int AddOnLeaveCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
Entity |
uiControl |
|
EventCallback |
callback |
|
Returns
Type |
Description |
System.Int32 |
|
AddOnUpCallback(ComponentSystem, Entity, EventCallback)
Sets the callback that is called when the control is released.
Declaration
public static int AddOnUpCallback(ComponentSystem sys, Entity uiControl, EventCallback callback)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
Entity |
uiControl |
|
EventCallback |
callback |
|
Returns
Type |
Description |
System.Int32 |
|
IsEnabled(ComponentSystem, Entity)
Declaration
public static bool IsEnabled(ComponentSystem sys, Entity uiControl)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
Entity |
uiControl |
|
Returns
Type |
Description |
System.Boolean |
|
RemoveCallback(ComponentSystem, Int32)
Declaration
public static void RemoveCallback(ComponentSystem sys, int callbackId)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
System.Int32 |
callbackId |
|
SetEnabled(ComponentSystem, Entity, Boolean)
Declaration
public static void SetEnabled(ComponentSystem sys, Entity uiControl, bool enabled)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
Entity |
uiControl |
|
System.Boolean |
enabled |
|