MaxValue||doc136514

September 20, 2022

Format

Slider.MaxValue

Describe

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

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

When the integer mode is used, if the set upper limit value (maxvalue) is less than or equal to the lower limit value (minValue), the upper limit value will be adjusted to (minValue + 1) to ensure that the upper limit value is greater than the lower 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 maximum value of the slider control
slider.Value = 1.6