📊CMenuSliderInt
CMenuSliderInt metatable.
:Update(minValue: integer
, maxValue: integer
, defaultValue: integer
): nil
integer
, maxValue: integer
, defaultValue: integer
): nil
Name | Type | Description |
---|---|---|
minValue |
| |
maxValue |
| |
defaultValue |
|
Updates the slider values.
:Name(): string
string
Returns widget's name.
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
Name | Type | Description |
---|---|---|
newText |
|
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
Name | Type | Description |
---|---|---|
newText |
|
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
Name | Type | Description |
---|---|---|
value |
|
Gets or sets visible state. Depends on argument.
Example
:Visible(): boolean
boolean
Example
:Disabled(value: boolean
): nil
boolean
): nil
Name | Type | Description |
---|---|---|
value |
|
Gets or sets disabled state. Depends on argument.
Example
:Disabled(): boolean
boolean
Example
:Unsafe(value: boolean
): nil
boolean
): nil
Name | Type | Description |
---|---|---|
value |
|
Gets or sets unsafe state. Unsafe widgets have warning sign. Depends on argument.
:Unsafe(): boolean
boolean
:Get(): integer
integer
Returns widget's value.
:Set(value: integer
): nil
integer
): nil
Name | Type | Description |
---|---|---|
value |
|
Sets widget's value.
Name | Type | Description |
---|---|---|
imagePath |
| Path to the image. |
offset | Optional image offset. |
Sets widget's image.
Name | Type | Description |
---|---|---|
icon |
| icon unicode. |
offset | Optional icon offset. |
Sets widget's icon. Icons list
Example
:SetCallback(callback: fun(this: CMenuSliderInt):nil
, forceCall [?]
: boolean
): nil
fun(this: CMenuSliderInt):nil
, forceCall [?]
: boolean
): nil
Multiple callbacks could be set.
Name | Type | Description |
---|---|---|
callback |
| function to be called on widget change. |
forceCall |
| true if you want to call callback on widget creation. |
Sets widget's on change callback.
:UnsetCallback(callback: fun(this: CMenuSliderInt):nil
): nil
fun(this: CMenuSliderInt):nil
): nil
Name | Type | Description |
---|---|---|
callback |
| function to be removed from widget's callbacks. |
Removes widget's on change callback.
Name | Type | Description |
---|---|---|
name |
| Name of the attachment. |
color | Default color. |
Creates CMenuColorPickerAttachment
and attaches it to the widget.
Name | Type | Description |
---|---|---|
name |
| Name of the attachment. |
gearIcon |
| Gear FontAwesome icon. |
useSmallFont |
| Use small font for gear icon. |
Creates CMenuGearAttachment
and attaches it to the widget.
Last updated