From 1d2595b36c506ff2c57239fcb65bf8262ef5a98c Mon Sep 17 00:00:00 2001 From: vaisest <4550061+vaisest@users.noreply.github.com> Date: Fri, 12 Jun 2026 20:56:56 +0300 Subject: [PATCH 1/4] Allow disabling scroll interacting with controls --- src/Classes/DropDownControl.lua | 6 ++++++ src/Classes/EditControl.lua | 4 ++-- src/Classes/SliderControl.lua | 4 ++-- src/Modules/Main.lua | 15 ++++++++++++++- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/Classes/DropDownControl.lua b/src/Classes/DropDownControl.lua index 008783f3dd..4543ea32bc 100644 --- a/src/Classes/DropDownControl.lua +++ b/src/Classes/DropDownControl.lua @@ -462,6 +462,9 @@ function DropDownClass:OnKeyUp(key) if self.dropped and self.controls.scrollBar.enabled then self.controls.scrollBar:Scroll(1) else + if main.disableScrollControlInteraction then + return + end self:SetSel(self:ListIndexToDropIndex(self.selIndex, 0) + 1) end return self @@ -473,6 +476,9 @@ function DropDownClass:OnKeyUp(key) if self.dropped and self.controls.scrollBar.enabled then self.controls.scrollBar:Scroll(-1) else + if main.disableScrollControlInteraction then + return + end self:SetSel(self:ListIndexToDropIndex(self.selIndex, 0) - 1) end return self diff --git a/src/Classes/EditControl.lua b/src/Classes/EditControl.lua index bf1c2a0c8d..51a492a13e 100644 --- a/src/Classes/EditControl.lua +++ b/src/Classes/EditControl.lua @@ -675,7 +675,7 @@ function EditClass:OnKeyUp(key) end elseif self.isNumeric then local cur = tonumber(self.buf) - if key == "WHEELUP" or key == "UP" then + if not main.disableScrollControlInteraction and (key == "WHEELUP" or key == "UP") then if cur then self:SetText(tostring(cur + (self.numberInc or 1)), true) else @@ -685,7 +685,7 @@ function EditClass:OnKeyUp(key) self:SetText("1", true) end end - elseif key == "WHEELDOWN" or key == "DOWN" then + elseif not main.disableScrollControlInteraction and (key == "WHEELDOWN" or key == "DOWN") then if cur then local value = cur - (self.numberInc or 1) if self.filter == "%D" or self.filter == "^%d." then diff --git a/src/Classes/SliderControl.lua b/src/Classes/SliderControl.lua index 2c3048de48..cf1f38bde8 100644 --- a/src/Classes/SliderControl.lua +++ b/src/Classes/SliderControl.lua @@ -161,7 +161,7 @@ function SliderClass:OnKeyUp(key) local cursorX, cursorY = GetCursorPos() self:SetValFromKnobX((cursorX - self.dragCX) + self.dragKnobX) end - elseif (not main.invertSliderScrollDirection and key == "WHEELDOWN") or (main.invertSliderScrollDirection and key == "WHEELUP") or key == "DOWN" or key == "LEFT" then + elseif not main.disableScrollControlInteraction and (not main.invertSliderScrollDirection and key == "WHEELDOWN") or (main.invertSliderScrollDirection and key == "WHEELUP") or key == "DOWN" or key == "LEFT" then if IsKeyDown("SHIFT") then self:SetVal(self.val - self.scrollWheelSpeedTbl["SHIFT"]) elseif IsKeyDown("CTRL") then @@ -169,7 +169,7 @@ function SliderClass:OnKeyUp(key) else self:SetVal(self.val - self.scrollWheelSpeedTbl["DEFAULT"]) end - elseif (not main.invertSliderScrollDirection and key == "WHEELUP") or (main.invertSliderScrollDirection and key == "WHEELDOWN") or key == "UP" or key == "RIGHT" then + elseif not main.disableScrollControlInteraction and (not main.invertSliderScrollDirection and key == "WHEELUP") or (main.invertSliderScrollDirection and key == "WHEELDOWN") or key == "UP" or key == "RIGHT" then if IsKeyDown("SHIFT") then self:SetVal(self.val + self.scrollWheelSpeedTbl["SHIFT"]) elseif IsKeyDown("CTRL") then diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index a9e86a5a8b..df038f526c 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -115,6 +115,7 @@ function main:Init() self.showFlavourText = true self.showAnimations = true self.showAllItemAffixes = true + self.disableScrollControlInteraction = false self.errorReadingSettings = false if not SetDPIScaleOverridePercent then SetDPIScaleOverridePercent = function(scale) end end @@ -662,6 +663,9 @@ function main:LoadSettings(ignoreBuild) if node.attrib.showAllItemAffixes then self.showAllItemAffixes = node.attrib.showAllItemAffixes == "true" end + if node.attrib.disableScrollControlInteraction then + self.disableScrollControlInteraction = node.attrib.disableScrollControlInteraction == "true" + end if node.attrib.dpiScaleOverridePercent then self.dpiScaleOverridePercent = tonumber(node.attrib.dpiScaleOverridePercent) or 0 SetDPIScaleOverridePercent(self.dpiScaleOverridePercent) @@ -797,6 +801,7 @@ function main:SaveSettings() showFlavourText = tostring(self.showFlavourText), showAnimations = tostring(self.showAnimations), showAllItemAffixes = tostring(self.showAllItemAffixes), + disableScrollControlInteraction = tostring(self.disableScrollControlInteraction), dpiScaleOverridePercent = tostring(self.dpiScaleOverridePercent) } }) local res, errMsg = common.xml.SaveXMLFile(setXML, self.userPath.."Settings.xml") @@ -881,6 +886,7 @@ function main:OpenOptionsPopup(savedState) showFlavourText = self.showFlavourText, showAnimations = self.showAnimations, showAllItemAffixes = self.showAllItemAffixes, + disableScrollControlInteraction = self.disableScrollControlInteraction, dpiScaleOverridePercent = self.dpiScaleOverridePercent } @@ -1052,7 +1058,13 @@ function main:OpenOptionsPopup(savedState) controls.showAllItemAffixes = new("CheckBoxControl", { "TOPLEFT", controls.sectionAnchor, "TOPLEFT" }, { currentX + 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" + controls.showAllItemAffixes.tooltipText = "Display all item affix slots as a stacked list instead of hiding them in dropdowns." + + nextRow() + controls.disableScrollControlInteraction = new("CheckBoxControl", { "TOPLEFT", controls.sectionAnchor, "TOPLEFT" }, { currentX + defaultLabelPlacementX, currentY, 20 }, "^7Disable control scroll interaction:", function(state) + self.disableScrollControlInteraction = state + end) + controls.disableScrollControlInteraction.tooltipText = "Disable changing the values in controls such as dropdowns, numeric inputs, or sliders when using the scroll wheel." nextRow() @@ -1169,6 +1181,7 @@ function main:OpenOptionsPopup(savedState) controls.showFlavourText.state = self.showFlavourText controls.showAnimations.state = self.showAnimations controls.showAllItemAffixes.state = self.showAllItemAffixes + controls.disableScrollControlInteraction.state = self.disableScrollControlInteraction -- Adjust height in case of two-column layout currentY = m_max(leftColumnMaxY, currentY) From caaa0a5bf1eeee9a8c4071f1d14d200deb67f541 Mon Sep 17 00:00:00 2001 From: vaisest <4550061+vaisest@users.noreply.github.com> Date: Fri, 26 Jun 2026 18:02:34 +0300 Subject: [PATCH 2/4] Revert SliderControl.lua (It actually makes sense here imo) --- src/Classes/SliderControl.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Classes/SliderControl.lua b/src/Classes/SliderControl.lua index cf1f38bde8..2c3048de48 100644 --- a/src/Classes/SliderControl.lua +++ b/src/Classes/SliderControl.lua @@ -161,7 +161,7 @@ function SliderClass:OnKeyUp(key) local cursorX, cursorY = GetCursorPos() self:SetValFromKnobX((cursorX - self.dragCX) + self.dragKnobX) end - elseif not main.disableScrollControlInteraction and (not main.invertSliderScrollDirection and key == "WHEELDOWN") or (main.invertSliderScrollDirection and key == "WHEELUP") or key == "DOWN" or key == "LEFT" then + elseif (not main.invertSliderScrollDirection and key == "WHEELDOWN") or (main.invertSliderScrollDirection and key == "WHEELUP") or key == "DOWN" or key == "LEFT" then if IsKeyDown("SHIFT") then self:SetVal(self.val - self.scrollWheelSpeedTbl["SHIFT"]) elseif IsKeyDown("CTRL") then @@ -169,7 +169,7 @@ function SliderClass:OnKeyUp(key) else self:SetVal(self.val - self.scrollWheelSpeedTbl["DEFAULT"]) end - elseif not main.disableScrollControlInteraction and (not main.invertSliderScrollDirection and key == "WHEELUP") or (main.invertSliderScrollDirection and key == "WHEELDOWN") or key == "UP" or key == "RIGHT" then + elseif (not main.invertSliderScrollDirection and key == "WHEELUP") or (main.invertSliderScrollDirection and key == "WHEELDOWN") or key == "UP" or key == "RIGHT" then if IsKeyDown("SHIFT") then self:SetVal(self.val + self.scrollWheelSpeedTbl["SHIFT"]) elseif IsKeyDown("CTRL") then From 981f9398644d4e29e8a6ff195e1e07059ae5427e Mon Sep 17 00:00:00 2001 From: vaisest <4550061+vaisest@users.noreply.github.com> Date: Fri, 26 Jun 2026 18:09:12 +0300 Subject: [PATCH 3/4] Only block scroll wheel, not arrow keys --- src/Classes/DropDownControl.lua | 4 ++-- src/Classes/EditControl.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Classes/DropDownControl.lua b/src/Classes/DropDownControl.lua index 4543ea32bc..cc7d47161f 100644 --- a/src/Classes/DropDownControl.lua +++ b/src/Classes/DropDownControl.lua @@ -462,7 +462,7 @@ function DropDownClass:OnKeyUp(key) if self.dropped and self.controls.scrollBar.enabled then self.controls.scrollBar:Scroll(1) else - if main.disableScrollControlInteraction then + if main.disableScrollControlInteraction and key == "WHEELDOWN" then return end self:SetSel(self:ListIndexToDropIndex(self.selIndex, 0) + 1) @@ -476,7 +476,7 @@ function DropDownClass:OnKeyUp(key) if self.dropped and self.controls.scrollBar.enabled then self.controls.scrollBar:Scroll(-1) else - if main.disableScrollControlInteraction then + if main.disableScrollControlInteraction and key == "WHEELUP" then return end self:SetSel(self:ListIndexToDropIndex(self.selIndex, 0) - 1) diff --git a/src/Classes/EditControl.lua b/src/Classes/EditControl.lua index 51a492a13e..dd81738884 100644 --- a/src/Classes/EditControl.lua +++ b/src/Classes/EditControl.lua @@ -675,7 +675,7 @@ function EditClass:OnKeyUp(key) end elseif self.isNumeric then local cur = tonumber(self.buf) - if not main.disableScrollControlInteraction and (key == "WHEELUP" or key == "UP") then + if (not main.disableScrollControlInteraction and (key == "WHEELUP")) or key == "UP" then if cur then self:SetText(tostring(cur + (self.numberInc or 1)), true) else @@ -685,7 +685,7 @@ function EditClass:OnKeyUp(key) self:SetText("1", true) end end - elseif not main.disableScrollControlInteraction and (key == "WHEELDOWN" or key == "DOWN") then + elseif (not main.disableScrollControlInteraction and (key == "WHEELDOWN")) or key == "DOWN" then if cur then local value = cur - (self.numberInc or 1) if self.filter == "%D" or self.filter == "^%d." then From 91cc506c7fb18500d678d8768d871520c4675d6f Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Sat, 27 Jun 2026 01:31:51 +1000 Subject: [PATCH 4/4] Fix tooltip + cancel selection The tooltip still mentioned scroll bars When pressing cancel it wasn't reverting to the previous choice --- src/Modules/Main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index df038f526c..98d4a786c0 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -1064,7 +1064,7 @@ function main:OpenOptionsPopup(savedState) controls.disableScrollControlInteraction = new("CheckBoxControl", { "TOPLEFT", controls.sectionAnchor, "TOPLEFT" }, { currentX + defaultLabelPlacementX, currentY, 20 }, "^7Disable control scroll interaction:", function(state) self.disableScrollControlInteraction = state end) - controls.disableScrollControlInteraction.tooltipText = "Disable changing the values in controls such as dropdowns, numeric inputs, or sliders when using the scroll wheel." + controls.disableScrollControlInteraction.tooltipText = "Disable changing the values in controls such as dropdowns or numeric inputs when using the scroll wheel." nextRow() @@ -1243,6 +1243,7 @@ function main:OpenOptionsPopup(savedState) self.showFlavourText = savedState.showFlavourText self.showAnimations = savedState.showAnimations self.showAllItemAffixes = savedState.showAllItemAffixes + self.disableScrollControlInteraction = savedState.disableScrollControlInteraction self.dpiScaleOverridePercent = savedState.dpiScaleOverridePercent SetDPIScaleOverridePercent(self.dpiScaleOverridePercent) main:ClosePopup()