✏️CMenuInputBox

CMenuInputBox metatable.

:Name(): string

Returns widget's name.


Returns widget's parent.


Returns widget type.


:Open(): nil

Opens parent tabs.


:ForceLocalization(newText: string): nil

Not recommended for use due to its complexity

Changes text in the widget. The path to the widget is not affected. May be used for dynamic text customization or recolor.


:ToolTip(newText: string): string

Gets or sets tooltip. Tooltip is displayed when mouse cursor is over the widget. Depends on the argument.


:ToolTip(): string


:Visible(value: boolean): nil

Gets or sets visible state. Depends on argument.

Example

-- setter
switch:Visible(false)

:Visible(): boolean

Example

-- getter
local isVisible = switch:Visible()

:Disabled(value: boolean): nil

Gets or sets disabled state. Depends on argument.

Example

-- setter
switch:Disabled( false )

:Disabled(): boolean

Example

-- getter
local isDisabled = switch:Disabled()

:Unsafe(value: boolean): nil

Gets or sets unsafe state. Unsafe widgets have warning sign. Depends on argument.


:Unsafe(): boolean


:Get(): string

Returns widget's value.


:Set(value: string): nil

Sets widget's value.


:Image(imagePath: string, offset [?]: Vec2): nil

Sets widget's image.


:Icon(icon: string, offset [?]: Vec2): nil

Sets widget's icon. Icons list

Example

--https://fontawesome.com/icons/user?f=classic&s=solid
switch:Icon("\f{007}")

:SetCallback(callback: fun(this: CMenuInputBox):nil, forceCall [?]: boolean): nil

Multiple callbacks could be set.

Sets widget's on change callback.


:UnsetCallback(callback: fun(this: CMenuInputBox):nil): nil

Removes widget's on change callback.


:ColorPicker(name: string, color: Color): CMenuColorPickerAttachment

Creates CMenuColorPickerAttachment and attaches it to the widget.


:Gear(name: string, gearIcon [?]: string, useSmallFont [?]: boolean): CMenuGearAttachment

Creates CMenuGearAttachment and attaches it to the widget.

Last updated