from retail
This commit is contained in:
@@ -449,7 +449,7 @@ local centeredIndexerStart = {
|
||||
if maxIndex >= 3 then
|
||||
return maxIndex - maxIndex % 2
|
||||
else
|
||||
return maxIndex
|
||||
return maxIndex > 0 and maxIndex or nil
|
||||
end
|
||||
end,
|
||||
-- Center -> Right -> Left, e.g: 3 1 2 4
|
||||
@@ -457,7 +457,7 @@ local centeredIndexerStart = {
|
||||
if maxIndex % 2 == 1 then
|
||||
return maxIndex
|
||||
else
|
||||
return maxIndex - 1
|
||||
return maxIndex > 0 and maxIndex - 1 or nil
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
@@ -344,8 +344,9 @@ local function SetProgressSource(self, progressSource)
|
||||
self:UpdateProgress()
|
||||
end
|
||||
local function SetAdjustedMin(self, adjustedMin)
|
||||
local percent = string.match(adjustedMin, "(%d+)%%")
|
||||
if percent then
|
||||
local index = adjustedMin:find("%% *$")
|
||||
if index then
|
||||
local percent = adjustedMin:sub(1, index-1)
|
||||
self.adjustedMinRelPercent = tonumber(percent) / 100
|
||||
self.adjustedMin = nil
|
||||
else
|
||||
@@ -355,8 +356,9 @@ local function SetAdjustedMin(self, adjustedMin)
|
||||
self:UpdateProgress()
|
||||
end
|
||||
local function SetAdjustedMax(self, adjustedMax)
|
||||
local percent = string.match(adjustedMax, "(%d+)%%")
|
||||
if percent then
|
||||
local index = adjustedMax:find("%% *$")
|
||||
if index then
|
||||
local percent = adjustedMax:sub(1, index-1)
|
||||
self.adjustedMaxRelPercent = tonumber(percent) / 100
|
||||
else
|
||||
self.adjustedMax = tonumber(adjustedMax)
|
||||
|
||||
Reference in New Issue
Block a user