diff --git a/FS25_ADSmartPickup/adSmartPickup.lua b/FS25_ADSmartPickup/adSmartPickup.lua index ef60141..5a361f4 100644 --- a/FS25_ADSmartPickup/adSmartPickup.lua +++ b/FS25_ADSmartPickup/adSmartPickup.lua @@ -1202,10 +1202,33 @@ local function insertInGameMenuPage(frame, pageName, iconFile, iconUVs, predicat end inGameMenu[pageName] = 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:updatePageMapping() inGameMenu:registerPage(frame, position, predicate) inGameMenu:addPageTab(frame, iconFile, iconUVs) + moveTo(inGameMenu.pageFrames, function(child) return child == frame end) if frame.updateAbsolutePosition ~= nil then frame:updateAbsolutePosition() end diff --git a/FS25_ADSmartPickup/modDesc.xml b/FS25_ADSmartPickup/modDesc.xml index abfd84f..81edcf3 100644 --- a/FS25_ADSmartPickup/modDesc.xml +++ b/FS25_ADSmartPickup/modDesc.xml @@ -1,7 +1,7 @@ masterdraco - 1.60.0.0 + 1.60.1.0 <en>AD Smart Pickup</en>