from retail

This commit is contained in:
NoM0Re
2025-01-25 23:37:36 +01:00
parent 4a326118da
commit 667a2f3f50
34 changed files with 788 additions and 242 deletions
+2 -2
View File
@@ -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
}
+6 -4
View File
@@ -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)