OTCv8 3.0 rev 2

This commit is contained in:
OTCv8
2021-04-07 21:31:27 +00:00
parent e93bcdc9cf
commit d77991f60f
85 changed files with 8780 additions and 8200 deletions

View File

@@ -194,12 +194,20 @@ function UIMiniWindowContainer:order()
if not children[i].miniLoaded then return end
end
table.sort(children, function(a, b)
local indexA = a.miniIndex or a.autoOpen or 999
local indexB = b.miniIndex or b.autoOpen or 999
return indexA < indexB
end)
self:reorderChildren(children)
local ignoreIndex = 0
for i=1,#children do
if children[i].miniIndex then
self:swapInsert(children[i], children[i].miniIndex)
elseif children[i].autoOpen then
self:swapInsert(children[i], children[i].autoOpen)
end
if children[i].save then
children[i].miniIndex = i - ignoreIndex
else
ignoreIndex = ignoreIndex + 1
end
end
end