🎨CMenuColorPickerAttachment

CMenuColorPickerAttachment 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

Name
Type
Description

newText

string

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


:Visible(value: boolean): nil

Name
Type
Description

value

boolean

Gets or sets visible state. Depends on argument.

Example

-- setter
widget:Visible(false)

:Visible(): boolean

Example

-- getter
local isVisible = widget:Visible()

:Disabled(value: boolean): nil

Name
Type
Description

value

boolean

Gets or sets disabled state. Depends on argument.

Example

-- setter
widget:Disabled( false )

:Disabled(): boolean

Example

-- getter
local isDisabled = widget:Disabled()

:Get(): Color

Returns widget's value.


:Set(value: Color): nil

Name
Type
Description

value

Sets widget's value.


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

Multiple callbacks could be set.

Name
Type
Description

callback

fun(this: CMenuColorPickerAttachment):nil

function to be called on widget change.

forceCall [?]

boolean

true if you want to call callback on widget creation. (default: false)

Sets widget's on change callback.


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

Name
Type
Description

callback

fun(this: CMenuColorPickerAttachment):nil

function to be removed from widget's callbacks.

Removes widget's on change callback.

Last updated