📋CMenuMultiSelect
CMenuMultiSelect metatable.
:Name(): string
string
Returns widget's name.
:Update(items: {nameId: string, imagePath: string, isEnabled: boolean}[]
, expanded [?]
: boolean
): nil
{nameId: string, imagePath: string, isEnabled: boolean}[]
, expanded [?]
: boolean
): nil
items
{nameId: string, imagePath: string, isEnabled: boolean}[]
See CMenuGroup:MultiSelect
.
expanded [?]
boolean
false if you want to create MultiSelect in collapsed state. (default: false)
Updates the multiselect values.
:OneItemSelection(newState: boolean
): boolean
boolean
): boolean
newState
boolean
Gets or sets one item selection state. One item selection allows only one item to be selected. Depends on the argument.
:OneItemSelection(): boolean
boolean
:DragAllowed(newState: boolean
): boolean
boolean
): boolean
newState
boolean
Gets or sets drag allowed state. Drag allows items to be ordered by cursor. Depends on the argument.
:DragAllowed(): boolean
boolean
Returns widget's parent.
:Type(): Enum.WidgetType
Enum.WidgetType
Returns widget type.
:Open(): nil
nil
Opens parent tabs.
:ForceLocalization(newText: string
): nil
string
): nil
Not recommended for use due to its complexity
newText
string
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
string
): string
newText
string
Gets or sets tooltip. Tooltip is displayed when mouse cursor is over the widget. Depends on the argument.
:ToolTip(): string
string
:Visible(value: boolean
): nil
boolean
): nil
value
boolean
Gets or sets visible state. Depends on argument.
Example
:Visible(): boolean
boolean
Example
:Disabled(value: boolean
): nil
boolean
): nil
value
boolean
Gets or sets disabled state. Depends on argument.
Example
:Disabled(): boolean
boolean
Example
:Unsafe(value: boolean
): nil
boolean
): nil
value
boolean
Gets or sets unsafe state. Unsafe widgets have warning sign. Depends on argument.
:Unsafe(): boolean
boolean
:Get(itemId: string
): boolean
string
): boolean
itemId
string
Returns enable state of the item in multiselect.
:Set(enabledItems: string[]
): nil
string[]
): nil
enabledItems
string[]
A table of enabled items; other items will be disabled.
Sets a new value for the item by itemId or sets a new list of enabled items
:Set(itemId: string
, value: boolean
): nil
string
, value: boolean
): nil
itemId
string
value
boolean
:ListEnabled(): string[]
string[]
Returns array of enabled itemIds.
imagePath
string
Path to the image.
offset [?]
Optional image offset. (default: {0.0, 0.0})
Sets widget's image.
icon
string
icon unicode.
offset [?]
Optional icon offset. (default: {0.0, 0.0})
Sets widget's icon. Icons list
Example
:SetCallback(callback: fun(this: CMenuMultiSelect):nil
, forceCall [?]
: boolean
): nil
fun(this: CMenuMultiSelect):nil
, forceCall [?]
: boolean
): nil
Multiple callbacks could be set.
callback
fun(this: CMenuMultiSelect):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: CMenuMultiSelect):nil
): nil
fun(this: CMenuMultiSelect):nil
): nil
callback
fun(this: CMenuMultiSelect):nil
function to be removed from widget's callbacks.
Removes widget's on change callback.
:UpdateBackgroundColors(colors: table<string>
): nil
table<string>
): nil
colors
table<string>
Table with background colors.
Updates widget's background colors.
:UpdateImageColors(colors: table<string>
): nil
table<string>
): nil
colors
table<string>
Table with image colors.
Updates widget's image colors.
:UpdateToolTips(colors: table<string>
): nil
table<string>
): nil
colors
table<string>
Table with new tooltips
Updates widget's tooltips
Last updated