feat(gui): Smart Pickup-fanen ligger lige over spillets Indstillinger i ESC-menuen (flyttes på alle tre lister som FarmOperationsDashboard) (v1.60.1.0)
This commit is contained in:
@@ -1202,10 +1202,33 @@ local function insertInGameMenuPage(frame, pageName, iconFile, iconUVs, predicat
|
|||||||
end
|
end
|
||||||
inGameMenu[pageName] = frame
|
inGameMenu[pageName] = frame
|
||||||
inGameMenu.pagingElement:addElement(frame)
|
inGameMenu.pagingElement:addElement(frame)
|
||||||
|
-- Lige over spillets Indstillinger (brugerønske 29/9). Siden flyttes på ALLE tre lister med samme indeks
|
||||||
|
-- (sider, pagerens sider, pageFrames) som FS25_FarmOperationsDashboard — at flytte kun nogle af dem gav
|
||||||
|
-- tidligere forskudt fane↔side. Uden Indstillinger-side: sidst som før.
|
||||||
|
local target = 0
|
||||||
|
for i, child in ipairs(inGameMenu.pagingElement.elements) do
|
||||||
|
if inGameMenu.pageSettings ~= nil and child == inGameMenu.pageSettings then
|
||||||
|
target = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local function moveTo(list, matches)
|
||||||
|
if target == 0 or list == nil then return end
|
||||||
|
for i, child in ipairs(list) do
|
||||||
|
if matches(child) then
|
||||||
|
table.remove(list, i)
|
||||||
|
table.insert(list, target, child)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
moveTo(inGameMenu.pagingElement.elements, function(child) return child == frame end)
|
||||||
|
moveTo(inGameMenu.pagingElement.pages, function(child) return child.element == frame end)
|
||||||
inGameMenu.pagingElement:updateAbsolutePosition()
|
inGameMenu.pagingElement:updateAbsolutePosition()
|
||||||
inGameMenu.pagingElement:updatePageMapping()
|
inGameMenu.pagingElement:updatePageMapping()
|
||||||
inGameMenu:registerPage(frame, position, predicate)
|
inGameMenu:registerPage(frame, position, predicate)
|
||||||
inGameMenu:addPageTab(frame, iconFile, iconUVs)
|
inGameMenu:addPageTab(frame, iconFile, iconUVs)
|
||||||
|
moveTo(inGameMenu.pageFrames, function(child) return child == frame end)
|
||||||
if frame.updateAbsolutePosition ~= nil then
|
if frame.updateAbsolutePosition ~= nil then
|
||||||
frame:updateAbsolutePosition()
|
frame:updateAbsolutePosition()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
<modDesc descVersion="107">
|
<modDesc descVersion="107">
|
||||||
<author>masterdraco</author>
|
<author>masterdraco</author>
|
||||||
<version>1.60.0.0</version>
|
<version>1.60.1.0</version>
|
||||||
<title>
|
<title>
|
||||||
<en>AD Smart Pickup</en>
|
<en>AD Smart Pickup</en>
|
||||||
</title>
|
</title>
|
||||||
|
|||||||
Reference in New Issue
Block a user