Slider
Usage​
Client/Index.lua
local slider = EGUI.Slider(10, 10, 100, 100, 50, 1, 100)
Constructor Parameters​
Type | Name | Default |
---|---|---|
number | posX | |
number | posY | |
number | width | |
number | height | |
number | value | |
number | min | |
number | max | |
table | parent | nil |
Functions​
Inherited Element Functions
Returns | Name | Description |
---|---|---|
Base Element | SetVisible | Sets element visibility |
boolean | IsVisible | Returns if element is visible |
Base Element | SetAlpha | Sets element alpha |
number | GetAlpha | Returns element alpha |
Base Element | SetPosition | Sets element position |
number , number | GetPosition | Returns element position |
Base Element | SetSize | Sets element size |
number , number | GetSize | Returns element size |
Base Element | SetAlignment | Sets element alignment |
string | GetAlignment | Gets element alignment |
Subscribe | Subscribes to an event | |
Unsubscribe | Unsubscribes from a event |
Inherited Input Functions
Returns | Name | Description |
---|---|---|
Base Input | SetEnabled | Allows enabling/disabling of the input |
boolean | IsEnabled | Whether the input is enabled |
Returns | Name | Description |
---|---|---|
Slider | SetValue | Sets value of the slider |
number | GetValue | Gets value of the slider |
Slider | SetMinValue | Sets min value of the slider |
number | GetMinValue | Gets min value of the slider |
Slider | SetMaxValue | Sets max value of the slider |
number | GetMaxValue | Gets max value of the slider |
SetValue​
Sets value of the slider
Returns the
Slider
(self)
slider:SetValue(50)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | value | The new value |
GetValue​
Gets value of the slider
Returns a
number
local value = slider:GetValue()
SetMinValue​
Sets min value of the slider
Returns the
Slider
(self)
slider:SetMin(50)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | min | The new min value |
GetMinValue​
Gets min value of the slider
Returns a
number
local min = slider:GetMinValue()
SetMaxValue​
Sets max value of the slider
Returns the
Slider
(self)
slider:SetMaxValue(70)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | max | The new max value |
GetMaxValue​
Gets max value of the slider
Returns a
number
local max = slider:GetMaxValue()
Events​
Name | Description |
---|---|
Change | Triggered when the value of the slider changed |
Change​
Triggered when the value of the slider changed
slider:Subscribe("Change", function(value)
end)