LuaWidgetControl

This type represents the base for a widget. It is used to create custom widgets that can be dragged around your screen.

You can use this as a base type for any draggable elements for your scripts, such as indicators and watermarks. If you wish to have children controls inside a draggable window, look at LuaPopupControl instead.

circle-info

This is just a control type, to learn how to create custom controls, see LuaControlProto documentation.

__call

Constructor

Constructs the custom widget.

Arguments

Name

Type

Description

id

ControlID|string

ID.

proto

Prototype for this control

position

Custom offset

size

Custom size

Returns

Type

Description

LuaWidgetControl

Custom widget instance.

Example


renderBackground

Field

Type: bool

If set to true, will render the default black and blurred background as other widgets.


ToggleVisibility

Method

Toggles the visibility on and off for this widget.

Arguments

Name

Type

Description

visible

boolean

Whether or not the widget is visible.

Returns

Nothing.

Example

Last updated