From 8872cc4fc101fb1722fa7660a8c49d40d0d7ab7c Mon Sep 17 00:00:00 2001 From: JustinStitt Date: Mon, 15 Dec 2025 13:57:26 +0000 Subject: [PATCH 1/3] Apply changes from https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/9187 --- src/Classes/ItemsTab.lua | 40 ++++++++++++++++++++-- src/Classes/ItemsTab.lua.rej | 14 ++++++++ src/Modules/Main.lua.rej | 64 ++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 src/Classes/ItemsTab.lua.rej create mode 100644 src/Modules/Main.lua.rej diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index 386e57d70..418f32cf0 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -813,13 +813,21 @@ holding Shift will put it in the second.]]) -- Section: Modifier Range self.controls.displayItemSectionRange = new("Control", {"TOPLEFT",self.controls.displayItemSectionCustom,"BOTTOMLEFT"}, {0, 0, 0, function() - return self.displayItem.rangeLineList[1] and 28 or 0 + if not self.displayItem or not self.displayItem.rangeLineList[1] then + return 0 + end + if main.showAllItemAffixes and self.displayItem.rarity == "UNIQUE" then + local count = #self.displayItem.rangeLineList + return count * 22 + 4 + else + return 28 + end end}) self.controls.displayItemRangeLine = new("DropDownControl", {"TOPLEFT",self.controls.displayItemSectionRange,"TOPLEFT"}, {0, 0, 350, 18}, nil, function(index, value) self.controls.displayItemRangeSlider.val = self.displayItem.rangeLineList[index].range end) self.controls.displayItemRangeLine.shown = function() - return self.displayItem and self.displayItem.rangeLineList[1] ~= nil + return self.displayItem and self.displayItem.rangeLineList[1] ~= nil and not (main.showAllItemAffixes and self.displayItem.rarity == "UNIQUE") end self.controls.displayItemRangeSlider = new("SliderControl", {"LEFT",self.controls.displayItemRangeLine,"RIGHT"}, {8, 0, 100, 18}, function(val) self.displayItem.rangeLineList[self.controls.displayItemRangeLine.selIndex].range = val @@ -828,6 +836,34 @@ holding Shift will put it in the second.]]) self:UpdateCustomControls() end) + for i = 1, 20 do + local prevControl = i == 1 and self.controls.displayItemSectionRange or self.controls["displayItemStackedRangeLine"..(i-1)] + + self.controls["displayItemStackedRangeLine"..i] = new("LabelControl", {"TOPLEFT",prevControl,"TOPLEFT"}, {0, function() + return i == 1 and 2 or 22 + end, 350, 14}, function() + if self.displayItem and self.displayItem.rangeLineList[i] then + return "^7" .. self.displayItem.rangeLineList[i].line + end + return "" + end) + self.controls["displayItemStackedRangeLine"..i].shown = function() + return main.showAllItemAffixes and self.displayItem and self.displayItem.rarity == "UNIQUE" and self.displayItem.rangeLineList[i] ~= nil + end + + self.controls["displayItemStackedRangeSlider"..i] = new("SliderControl", {"LEFT",self.controls["displayItemStackedRangeLine"..i],"RIGHT"}, {8, 0, 100, 18}, function(val) + if self.displayItem and self.displayItem.rangeLineList[i] then + self.displayItem.rangeLineList[i].range = val + self.displayItem:BuildAndParseRaw() + self:UpdateDisplayItemTooltip() + self:UpdateCustomControls() + end + end) + self.controls["displayItemStackedRangeSlider"..i].shown = function() + return self.controls["displayItemStackedRangeLine"..i]:IsShown() + end + end + -- Tooltip anchor self.controls.displayItemTooltipAnchor = new("Control", {"TOPLEFT",self.controls.displayItemSectionRange,"BOTTOMLEFT"}) diff --git a/src/Classes/ItemsTab.lua.rej b/src/Classes/ItemsTab.lua.rej new file mode 100644 index 000000000..07db8a5f2 --- /dev/null +++ b/src/Classes/ItemsTab.lua.rej @@ -0,0 +1,14 @@ +diff a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua (rejected hunks) +@@ -1871,8 +1907,11 @@ end + function ItemsTabClass:UpdateDisplayItemRangeLines() + if self.displayItem and self.displayItem.rangeLineList[1] then + wipeTable(self.controls.displayItemRangeLine.list) +- for _, modLine in ipairs(self.displayItem.rangeLineList) do ++ for i, modLine in ipairs(self.displayItem.rangeLineList) do + t_insert(self.controls.displayItemRangeLine.list, modLine.line) ++ if self.controls["displayItemStackedRangeSlider"..i] then ++ self.controls["displayItemStackedRangeSlider"..i].val = modLine.range ++ end + end + self.controls.displayItemRangeLine.selIndex = 1 + self.controls.displayItemRangeSlider.val = self.displayItem.rangeLineList[1].range diff --git a/src/Modules/Main.lua.rej b/src/Modules/Main.lua.rej new file mode 100644 index 000000000..28dfb05c7 --- /dev/null +++ b/src/Modules/Main.lua.rej @@ -0,0 +1,64 @@ +diff a/src/Modules/Main.lua b/src/Modules/Main.lua (rejected hunks) +@@ -112,6 +112,7 @@ function main:Init() + self.POESESSID = "" + self.showPublicBuilds = true + self.showFlavourText = true ++ self.showAllItemAffixes = false + + if not SetDPIScaleOverridePercent then SetDPIScaleOverridePercent = function(scale) end end + +@@ -645,6 +646,9 @@ function main:LoadSettings(ignoreBuild) + if node.attrib.showFlavourText then + self.showFlavourText = node.attrib.showFlavourText == "true" + end ++ if node.attrib.showAllItemAffixes then ++ self.showAllItemAffixes = node.attrib.showAllItemAffixes == "true" ++ end + if node.attrib.dpiScaleOverridePercent then + self.dpiScaleOverridePercent = tonumber(node.attrib.dpiScaleOverridePercent) or 0 + SetDPIScaleOverridePercent(self.dpiScaleOverridePercent) +@@ -767,6 +771,7 @@ function main:SaveSettings() + disableDevAutoSave = tostring(self.disableDevAutoSave), + showPublicBuilds = tostring(self.showPublicBuilds), + showFlavourText = tostring(self.showFlavourText), ++ showAllItemAffixes = tostring(self.showAllItemAffixes), + dpiScaleOverridePercent = tostring(self.dpiScaleOverridePercent), + } }) + local res, errMsg = common.xml.SaveXMLFile(setXML, self.userPath.."Settings.xml") +@@ -969,6 +974,12 @@ function main:OpenOptionsPopup() + self.showFlavourText = state + end) + ++ nextRow() ++ controls.showAllItemAffixes = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Show all item affixes sans dropdowns:", function(state) ++ self.showAllItemAffixes = state ++ end) ++ controls.showAllItemAffixes.tooltipText = "Display all item affix slots as a stacked list instead of hiding them in dropdowns" ++ + nextRow() + drawSectionHeader("build", "Build-related options") + +@@ -1058,6 +1069,7 @@ function main:OpenOptionsPopup() + controls.titlebarName.state = self.showTitlebarName + controls.showPublicBuilds.state = self.showPublicBuilds + controls.showFlavourText.state = self.showFlavourText ++ controls.showAllItemAffixes.state = self.showAllItemAffixes + local initialNodePowerTheme = self.nodePowerTheme + local initialColorPositive = self.colorPositive + local initialColorNegative = self.colorNegative +@@ -1077,6 +1089,7 @@ function main:OpenOptionsPopup() + local initialInvertSliderScrollDirection = self.invertSliderScrollDirection + local initialDisableDevAutoSave = self.disableDevAutoSave + local initialShowPublicBuilds = self.showPublicBuilds ++ local initialShowAllItemAffixes = self.showAllItemAffixes + local initialShowFlavourText = self.showFlavourText + local initialDpiScaleOverridePercent = self.dpiScaleOverridePercent + +@@ -1132,6 +1145,7 @@ function main:OpenOptionsPopup() + self.disableDevAutoSave = initialDisableDevAutoSave + self.showPublicBuilds = initialShowPublicBuilds + self.showFlavourText = initialShowFlavourText ++ self.showAllItemAffixes = initialShowAllItemAffixes + self.dpiScaleOverridePercent = initialDpiScaleOverridePercent + SetDPIScaleOverridePercent(self.dpiScaleOverridePercent) + main:ClosePopup() From 8dc63ca2997e9aa90d335398e11203a1c52e8398 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Tue, 16 Dec 2025 05:08:58 +1100 Subject: [PATCH 2/3] Fix merge conflicts --- src/Classes/ItemsTab.lua | 5 ++- src/Classes/ItemsTab.lua.rej | 14 -------- src/Modules/Main.lua | 14 ++++++++ src/Modules/Main.lua.rej | 64 ------------------------------------ 4 files changed, 18 insertions(+), 79 deletions(-) delete mode 100644 src/Classes/ItemsTab.lua.rej delete mode 100644 src/Modules/Main.lua.rej diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index 418f32cf0..b31d57e91 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -1820,7 +1820,10 @@ end function ItemsTabClass:UpdateDisplayItemRangeLines() if self.displayItem and self.displayItem.rangeLineList[1] then wipeTable(self.controls.displayItemRangeLine.list) - for _, modLine in ipairs(self.displayItem.rangeLineList) do + for i, modLine in ipairs(self.displayItem.rangeLineList) do + if self.controls["displayItemStackedRangeSlider"..i] then + self.controls["displayItemStackedRangeSlider"..i].val = modLine.range + end -- primarily for Against the Darkness // a way to cut down on really long modLines, gsub could be updated for others t_insert(self.controls.displayItemRangeLine.list, (modLine.line:gsub(" Passive Skills in Radius also grant", ":"))) end diff --git a/src/Classes/ItemsTab.lua.rej b/src/Classes/ItemsTab.lua.rej deleted file mode 100644 index 07db8a5f2..000000000 --- a/src/Classes/ItemsTab.lua.rej +++ /dev/null @@ -1,14 +0,0 @@ -diff a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua (rejected hunks) -@@ -1871,8 +1907,11 @@ end - function ItemsTabClass:UpdateDisplayItemRangeLines() - if self.displayItem and self.displayItem.rangeLineList[1] then - wipeTable(self.controls.displayItemRangeLine.list) -- for _, modLine in ipairs(self.displayItem.rangeLineList) do -+ for i, modLine in ipairs(self.displayItem.rangeLineList) do - t_insert(self.controls.displayItemRangeLine.list, modLine.line) -+ if self.controls["displayItemStackedRangeSlider"..i] then -+ self.controls["displayItemStackedRangeSlider"..i].val = modLine.range -+ end - end - self.controls.displayItemRangeLine.selIndex = 1 - self.controls.displayItemRangeSlider.val = self.displayItem.rangeLineList[1].range diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index f1fb99310..3d969ea4c 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -112,6 +112,7 @@ function main:Init() --self.showPublicBuilds = true self.showFlavourText = true self.showAnimations = true + self.showAllItemAffixes = true self.errorReadingSettings = false if self.userPath then @@ -656,6 +657,9 @@ function main:LoadSettings(ignoreBuild) if node.attrib.showAnimations then self.showAnimations = node.attrib.showAnimations == "true" end + if node.attrib.showAllItemAffixes then + self.showAllItemAffixes = node.attrib.showAllItemAffixes == "true" + end if node.attrib.dpiScaleOverridePercent then self.dpiScaleOverridePercent = tonumber(node.attrib.dpiScaleOverridePercent) or 0 SetDPIScaleOverridePercent(self.dpiScaleOverridePercent) @@ -789,6 +793,7 @@ function main:SaveSettings() --showPublicBuilds = tostring(self.showPublicBuilds), showFlavourText = tostring(self.showFlavourText), showAnimations = tostring(self.showAnimations), + showAllItemAffixes = tostring(self.showAllItemAffixes), dpiScaleOverridePercent = tostring(self.dpiScaleOverridePercent) } }) local res, errMsg = common.xml.SaveXMLFile(setXML, self.userPath.."Settings.xml") @@ -995,6 +1000,12 @@ function main:OpenOptionsPopup() controls.showAnimations = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Show Animations:", function(state) self.showAnimations = state end) + + nextRow() + controls.showAllItemAffixes = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Show all item affixes sliders:", function(state) + self.showAllItemAffixes = state + end) + controls.showAllItemAffixes.tooltipText = "Display all item affix slots as a stacked list instead of hiding them in dropdowns" nextRow() drawSectionHeader("build", "Build-related options") @@ -1086,6 +1097,7 @@ function main:OpenOptionsPopup() --controls.showPublicBuilds.state = self.showPublicBuilds controls.showFlavourText.state = self.showFlavourText controls.showAnimations.state = self.showAnimations + controls.showAllItemAffixes.state = self.showAllItemAffixes local initialNodePowerTheme = self.nodePowerTheme local initialColorPositive = self.colorPositive local initialColorNegative = self.colorNegative @@ -1107,6 +1119,7 @@ function main:OpenOptionsPopup() --local initialShowPublicBuilds = self.showPublicBuilds local initialShowFlavourText = self.showFlavourText local initialShowAnimations = self.showAnimations + local initialShowAllItemAffixes = self.showAllItemAffixes local initialDpiScaleOverridePercent = self.dpiScaleOverridePercent -- last line with buttons has more spacing @@ -1162,6 +1175,7 @@ function main:OpenOptionsPopup() self.showPublicBuilds = initialShowPublicBuilds self.showFlavourText = initialShowFlavourText self.showAnimations = initialShowAnimations + self.showAllItemAffixes = initialShowAllItemAffixes self.dpiScaleOverridePercent = initialDpiScaleOverridePercent SetDPIScaleOverridePercent(self.dpiScaleOverridePercent) main:ClosePopup() diff --git a/src/Modules/Main.lua.rej b/src/Modules/Main.lua.rej deleted file mode 100644 index 28dfb05c7..000000000 --- a/src/Modules/Main.lua.rej +++ /dev/null @@ -1,64 +0,0 @@ -diff a/src/Modules/Main.lua b/src/Modules/Main.lua (rejected hunks) -@@ -112,6 +112,7 @@ function main:Init() - self.POESESSID = "" - self.showPublicBuilds = true - self.showFlavourText = true -+ self.showAllItemAffixes = false - - if not SetDPIScaleOverridePercent then SetDPIScaleOverridePercent = function(scale) end end - -@@ -645,6 +646,9 @@ function main:LoadSettings(ignoreBuild) - if node.attrib.showFlavourText then - self.showFlavourText = node.attrib.showFlavourText == "true" - end -+ if node.attrib.showAllItemAffixes then -+ self.showAllItemAffixes = node.attrib.showAllItemAffixes == "true" -+ end - if node.attrib.dpiScaleOverridePercent then - self.dpiScaleOverridePercent = tonumber(node.attrib.dpiScaleOverridePercent) or 0 - SetDPIScaleOverridePercent(self.dpiScaleOverridePercent) -@@ -767,6 +771,7 @@ function main:SaveSettings() - disableDevAutoSave = tostring(self.disableDevAutoSave), - showPublicBuilds = tostring(self.showPublicBuilds), - showFlavourText = tostring(self.showFlavourText), -+ showAllItemAffixes = tostring(self.showAllItemAffixes), - dpiScaleOverridePercent = tostring(self.dpiScaleOverridePercent), - } }) - local res, errMsg = common.xml.SaveXMLFile(setXML, self.userPath.."Settings.xml") -@@ -969,6 +974,12 @@ function main:OpenOptionsPopup() - self.showFlavourText = state - end) - -+ nextRow() -+ controls.showAllItemAffixes = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Show all item affixes sans dropdowns:", function(state) -+ self.showAllItemAffixes = state -+ end) -+ controls.showAllItemAffixes.tooltipText = "Display all item affix slots as a stacked list instead of hiding them in dropdowns" -+ - nextRow() - drawSectionHeader("build", "Build-related options") - -@@ -1058,6 +1069,7 @@ function main:OpenOptionsPopup() - controls.titlebarName.state = self.showTitlebarName - controls.showPublicBuilds.state = self.showPublicBuilds - controls.showFlavourText.state = self.showFlavourText -+ controls.showAllItemAffixes.state = self.showAllItemAffixes - local initialNodePowerTheme = self.nodePowerTheme - local initialColorPositive = self.colorPositive - local initialColorNegative = self.colorNegative -@@ -1077,6 +1089,7 @@ function main:OpenOptionsPopup() - local initialInvertSliderScrollDirection = self.invertSliderScrollDirection - local initialDisableDevAutoSave = self.disableDevAutoSave - local initialShowPublicBuilds = self.showPublicBuilds -+ local initialShowAllItemAffixes = self.showAllItemAffixes - local initialShowFlavourText = self.showFlavourText - local initialDpiScaleOverridePercent = self.dpiScaleOverridePercent - -@@ -1132,6 +1145,7 @@ function main:OpenOptionsPopup() - self.disableDevAutoSave = initialDisableDevAutoSave - self.showPublicBuilds = initialShowPublicBuilds - self.showFlavourText = initialShowFlavourText -+ self.showAllItemAffixes = initialShowAllItemAffixes - self.dpiScaleOverridePercent = initialDpiScaleOverridePercent - SetDPIScaleOverridePercent(self.dpiScaleOverridePercent) - main:ClosePopup() From a6f9fed4135627d80b7aec6a006b37ffad3a5e0d Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Tue, 16 Dec 2025 05:13:43 +1100 Subject: [PATCH 3/3] PR#1593 changes Merged the changes from the other PR into this one --- src/Classes/ItemsTab.lua | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index b31d57e91..09bc151fd 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -837,21 +837,11 @@ holding Shift will put it in the second.]]) end) for i = 1, 20 do - local prevControl = i == 1 and self.controls.displayItemSectionRange or self.controls["displayItemStackedRangeLine"..(i-1)] + local baseControl = i == 1 and self.controls.displayItemSectionRange or self.controls["displayItemStackedRangeSlider"..(i-1)] - self.controls["displayItemStackedRangeLine"..i] = new("LabelControl", {"TOPLEFT",prevControl,"TOPLEFT"}, {0, function() + self.controls["displayItemStackedRangeSlider"..i] = new("SliderControl", {"TOPLEFT",baseControl,"TOPLEFT"}, {0, function() return i == 1 and 2 or 22 - end, 350, 14}, function() - if self.displayItem and self.displayItem.rangeLineList[i] then - return "^7" .. self.displayItem.rangeLineList[i].line - end - return "" - end) - self.controls["displayItemStackedRangeLine"..i].shown = function() - return main.showAllItemAffixes and self.displayItem and self.displayItem.rarity == "UNIQUE" and self.displayItem.rangeLineList[i] ~= nil - end - - self.controls["displayItemStackedRangeSlider"..i] = new("SliderControl", {"LEFT",self.controls["displayItemStackedRangeLine"..i],"RIGHT"}, {8, 0, 100, 18}, function(val) + end, 100, 18}, function(val) if self.displayItem and self.displayItem.rangeLineList[i] then self.displayItem.rangeLineList[i].range = val self.displayItem:BuildAndParseRaw() @@ -859,8 +849,18 @@ holding Shift will put it in the second.]]) self:UpdateCustomControls() end end) + self.controls["displayItemStackedRangeLine"..i] = new("LabelControl", {"LEFT",self.controls["displayItemStackedRangeSlider"..i],"RIGHT"}, {8, -2, 350, 14}, function() + if self.displayItem and self.displayItem.rangeLineList[i] then + return "^7" .. self.displayItem.rangeLineList[i].line + end + return "" + end) self.controls["displayItemStackedRangeSlider"..i].shown = function() - return self.controls["displayItemStackedRangeLine"..i]:IsShown() + return main.showAllItemAffixes and self.displayItem and self.displayItem.rarity == "UNIQUE" and self.displayItem.rangeLineList[i] ~= nil + end + + self.controls["displayItemStackedRangeLine"..i].shown = function() + return self.controls["displayItemStackedRangeSlider"..i]:IsShown() end end