September 20, 2022




The current value of the slider control slider Value, between the lower limit slider MinValue and upper slider Maxvalue, the default value is 0. When other attributes change, the value may change. For example, when setting the lower limit value, if the current value is smaller than the lower limit value, the value will be adjusted to the lower limit value to ensure that it is between the upper and lower limits.

Code Example


-- create layout window
local APIRootWindow = UI:CreateGUIWindow("API")

--Set the window to the root node of the UI
APIRootWindow.Parent = UI.Root

--Get the Slider control for testing according to the name
local slider = APIRootWindow.APISlider

--Set the current value of the slider control
slider.Value = 0.6