@@ -118,6 +118,7 @@ function main:Init()
118118 self .showFlavourText = true
119119 self .showAnimations = true
120120 self .showAllItemAffixes = true
121+ self .disableScrollControlInteraction = false
121122 self .errorReadingSettings = false
122123
123124 if not SetDPIScaleOverridePercent then SetDPIScaleOverridePercent = function (scale ) end end
@@ -626,6 +627,9 @@ function main:LoadSettings(ignoreBuild)
626627 if node .attrib .showAllItemAffixes then
627628 self .showAllItemAffixes = node .attrib .showAllItemAffixes == " true"
628629 end
630+ if node .attrib .disableScrollControlInteraction then
631+ self .disableScrollControlInteraction = node .attrib .disableScrollControlInteraction == " true"
632+ end
629633 if node .attrib .dpiScaleOverridePercent then
630634 self .dpiScaleOverridePercent = tonumber (node .attrib .dpiScaleOverridePercent ) or 0
631635 SetDPIScaleOverridePercent (self .dpiScaleOverridePercent )
@@ -760,6 +764,7 @@ function main:SaveSettings()
760764 showFlavourText = tostring (self .showFlavourText ),
761765 showAnimations = tostring (self .showAnimations ),
762766 showAllItemAffixes = tostring (self .showAllItemAffixes ),
767+ disableScrollControlInteraction = tostring (self .disableScrollControlInteraction ),
763768 dpiScaleOverridePercent = tostring (self .dpiScaleOverridePercent ),
764769 } })
765770 local res , errMsg = common .xml .SaveXMLFile (setXML , self .userPath .. " Settings.xml" )
@@ -844,6 +849,7 @@ function main:OpenOptionsPopup(savedState)
844849 showFlavourText = self .showFlavourText ,
845850 showAnimations = self .showAnimations ,
846851 showAllItemAffixes = self .showAllItemAffixes ,
852+ disableScrollControlInteraction = self .disableScrollControlInteraction ,
847853 dpiScaleOverridePercent = self .dpiScaleOverridePercent
848854 }
849855
@@ -1020,7 +1026,13 @@ function main:OpenOptionsPopup(savedState)
10201026 controls .showAllItemAffixes = new (" CheckBoxControl" , { " TOPLEFT" , controls .sectionAnchor , " TOPLEFT" }, { currentX + defaultLabelPlacementX , currentY , 20 }, " ^7Show all item affixes sliders:" , function (state )
10211027 self .showAllItemAffixes = state
10221028 end )
1023- controls .showAllItemAffixes .tooltipText = " Display all item affix slots as a stacked list instead of hiding them in dropdowns"
1029+ controls .showAllItemAffixes .tooltipText = " Display all item affix slots as a stacked list instead of hiding them in dropdowns."
1030+
1031+ nextRow ()
1032+ controls .disableScrollControlInteraction = new (" CheckBoxControl" , { " TOPLEFT" , controls .sectionAnchor , " TOPLEFT" }, { currentX + defaultLabelPlacementX , currentY , 20 }, " ^7Disable control scroll interaction:" , function (state )
1033+ self .disableScrollControlInteraction = state
1034+ end )
1035+ controls .disableScrollControlInteraction .tooltipText = " Disable changing the values in controls such as dropdowns or numeric inputs when using the scroll wheel."
10241036
10251037 nextRow ()
10261038
@@ -1130,6 +1142,7 @@ function main:OpenOptionsPopup(savedState)
11301142 controls .showFlavourText .state = self .showFlavourText
11311143 controls .showAnimations .state = self .showAnimations
11321144 controls .showAllItemAffixes .state = self .showAllItemAffixes
1145+ controls .disableScrollControlInteraction .state = self .disableScrollControlInteraction
11331146
11341147 -- Adjust height in case of two-column layout
11351148 currentY = m_max (leftColumnMaxY , currentY )
@@ -1190,6 +1203,7 @@ function main:OpenOptionsPopup(savedState)
11901203 self .showFlavourText = savedState .showFlavourText
11911204 self .showAnimations = savedState .showAnimations
11921205 self .showAllItemAffixes = savedState .showAllItemAffixes
1206+ self .disableScrollControlInteraction = savedState .disableScrollControlInteraction
11931207 self .dpiScaleOverridePercent = savedState .dpiScaleOverridePercent
11941208 SetDPIScaleOverridePercent (self .dpiScaleOverridePercent )
11951209 main :ClosePopup ()
0 commit comments