MinValue||doc136513

September 20, 2022

Format

Slider.MinValue

Describe

The lower limit of the value of the slider control cannot be greater than or equal to the upper limit. The default value is 0.

When the integer mode is not used, if the set lower limit value (minValue) is greater than or equal to the upper limit value (maxvalue), the lower limit value will be adjusted to (maxvalue – 0.01) to ensure that the lower limit value is smaller than the upper limit value.

When the integer mode is used, if the set lower limit value (minValue) is greater than or equal to the upper limit value (maxvalue), the lower limit value will be adjusted to (maxvalue – 1) to ensure that the lower limit value is smaller than the upper limit value.

Code Example

image.png

-- 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 minimum value of the slider control
slider.Value = 0.2