Skip to main content

Slider

Slider

Usage​

Client/Index.lua
local slider = EGUI.Slider(10, 10, 100, 100, 50, 1, 100)

Constructor Parameters​

TypeNameDefault
numberposX
numberposY
numberwidth
numberheight
numbervalue
numbermin
numbermax
tableparentnil

Functions​

Inherited Element Functions
ReturnsNameDescription
Base ElementSetVisibleSets element visibility
booleanIsVisibleReturns if element is visible
Base ElementSetAlphaSets element alpha
numberGetAlphaReturns element alpha
Base ElementSetPositionSets element position
number, numberGetPositionReturns element position
Base ElementSetSizeSets element size
number, numberGetSizeReturns element size
Base ElementSetAlignmentSets element alignment
stringGetAlignmentGets element alignment
SubscribeSubscribes to an event
UnsubscribeUnsubscribes from a event
Inherited Input Functions
ReturnsNameDescription
Base InputSetEnabledAllows enabling/disabling of the input
booleanIsEnabledWhether the input is enabled
ReturnsNameDescription
SliderSetValueSets value of the slider
numberGetValueGets value of the slider
SliderSetMinValueSets min value of the slider
numberGetMinValueGets min value of the slider
SliderSetMaxValueSets max value of the slider
numberGetMaxValueGets max value of the slider

SetValue​

Sets value of the slider

Returns the Slider (self)

slider:SetValue(50)
TypeParameterDefault ValueDescription
numbervalueThe 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)
TypeParameterDefault ValueDescription
numberminThe 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)
TypeParameterDefault ValueDescription
numbermaxThe new max value

GetMaxValue​

Gets max value of the slider

Returns a number

local max = slider:GetMaxValue()

Events​

NameDescription
ChangeTriggered when the value of the slider changed

Change​

Triggered when the value of the slider changed

slider:Subscribe("Change", function(value)

end)