from retail
This commit is contained in:
@@ -677,8 +677,18 @@ typeControlAdders = {
|
||||
bigStep = option.bigStep
|
||||
min = option.min
|
||||
max = option.max
|
||||
if max and min then
|
||||
max = math.max(min, max)
|
||||
local effectiveMin = softMin or min or 0
|
||||
local effectiveMax = softMax or max or 100
|
||||
if (effectiveMin > effectiveMax) then
|
||||
-- This will cause a error inside the slider
|
||||
-- Fix up either softMax or max, depending on which one is the effective one
|
||||
if softMax then
|
||||
softMax = effectiveMin
|
||||
elseif max then
|
||||
max = effectiveMin
|
||||
else
|
||||
softMax = effectiveMin
|
||||
end
|
||||
end
|
||||
step = option.step
|
||||
args[prefix .. "default"] = {
|
||||
@@ -967,7 +977,6 @@ typeControlAdders = {
|
||||
end,
|
||||
multiselect = function(options, args, data, order, prefix, i)
|
||||
local option = options[i]
|
||||
args[prefix .. "width"] = nil
|
||||
local values = getValues(option)
|
||||
local defaultValues = {}
|
||||
for i, v in ipairs(values) do
|
||||
@@ -2234,8 +2243,18 @@ local function addUserModeOption(options, args, data, order, prefix, i)
|
||||
userOption.bigStep = option.bigStep
|
||||
userOption.min = option.min
|
||||
userOption.max = option.max
|
||||
if userOption.max and userOption.min then
|
||||
userOption.max = max(userOption.min, userOption.max)
|
||||
local effectiveMin = userOption.softMin or userOption.min or 0
|
||||
local effectiveMax = userOption.softMax or userOption.max or 100
|
||||
if (effectiveMin > effectiveMax) then
|
||||
-- This will cause a error inside the slider
|
||||
-- Fix up either softMax or max, depending on which one is the effective one
|
||||
if userOption.softMax then
|
||||
userOption.softMax = effectiveMin
|
||||
elseif userOption.max then
|
||||
userOption.max = effectiveMin
|
||||
else
|
||||
userOption.softMax = effectiveMin
|
||||
end
|
||||
end
|
||||
userOption.step = option.step
|
||||
elseif optionType == "color" then
|
||||
|
||||
Reference in New Issue
Block a user