@@ -115,6 +115,7 @@ function main:Init()
115115 self .showFlavourText = true
116116 self .showAnimations = true
117117 self .showAllItemAffixes = true
118+ self .disableScrollControlInteraction = false
118119 self .errorReadingSettings = false
119120
120121 if not SetDPIScaleOverridePercent then SetDPIScaleOverridePercent = function (scale ) end end
@@ -662,6 +663,9 @@ function main:LoadSettings(ignoreBuild)
662663 if node .attrib .showAllItemAffixes then
663664 self .showAllItemAffixes = node .attrib .showAllItemAffixes == " true"
664665 end
666+ if node .attrib .disableScrollControlInteraction then
667+ self .disableScrollControlInteraction = node .attrib .disableScrollControlInteraction == " true"
668+ end
665669 if node .attrib .dpiScaleOverridePercent then
666670 self .dpiScaleOverridePercent = tonumber (node .attrib .dpiScaleOverridePercent ) or 0
667671 SetDPIScaleOverridePercent (self .dpiScaleOverridePercent )
@@ -797,6 +801,7 @@ function main:SaveSettings()
797801 showFlavourText = tostring (self .showFlavourText ),
798802 showAnimations = tostring (self .showAnimations ),
799803 showAllItemAffixes = tostring (self .showAllItemAffixes ),
804+ disableScrollControlInteraction = tostring (self .disableScrollControlInteraction ),
800805 dpiScaleOverridePercent = tostring (self .dpiScaleOverridePercent )
801806 } })
802807 local res , errMsg = common .xml .SaveXMLFile (setXML , self .userPath .. " Settings.xml" )
@@ -881,6 +886,7 @@ function main:OpenOptionsPopup(savedState)
881886 showFlavourText = self .showFlavourText ,
882887 showAnimations = self .showAnimations ,
883888 showAllItemAffixes = self .showAllItemAffixes ,
889+ disableScrollControlInteraction = self .disableScrollControlInteraction ,
884890 dpiScaleOverridePercent = self .dpiScaleOverridePercent
885891 }
886892
@@ -1052,7 +1058,13 @@ function main:OpenOptionsPopup(savedState)
10521058 controls .showAllItemAffixes = new (" CheckBoxControl" , { " TOPLEFT" , controls .sectionAnchor , " TOPLEFT" }, { currentX + defaultLabelPlacementX , currentY , 20 }, " ^7Show all item affixes sliders:" , function (state )
10531059 self .showAllItemAffixes = state
10541060 end )
1055- controls .showAllItemAffixes .tooltipText = " Display all item affix slots as a stacked list instead of hiding them in dropdowns"
1061+ controls .showAllItemAffixes .tooltipText = " Display all item affix slots as a stacked list instead of hiding them in dropdowns."
1062+
1063+ nextRow ()
1064+ controls .disableScrollControlInteraction = new (" CheckBoxControl" , { " TOPLEFT" , controls .sectionAnchor , " TOPLEFT" }, { currentX + defaultLabelPlacementX , currentY , 20 }, " ^7Disable control scroll interaction:" , function (state )
1065+ self .disableScrollControlInteraction = state
1066+ end )
1067+ controls .disableScrollControlInteraction .tooltipText = " Disable changing the values in controls such as dropdowns or numeric inputs when using the scroll wheel."
10561068
10571069 nextRow ()
10581070
@@ -1169,6 +1181,7 @@ function main:OpenOptionsPopup(savedState)
11691181 controls .showFlavourText .state = self .showFlavourText
11701182 controls .showAnimations .state = self .showAnimations
11711183 controls .showAllItemAffixes .state = self .showAllItemAffixes
1184+ controls .disableScrollControlInteraction .state = self .disableScrollControlInteraction
11721185
11731186 -- Adjust height in case of two-column layout
11741187 currentY = m_max (leftColumnMaxY , currentY )
@@ -1230,6 +1243,7 @@ function main:OpenOptionsPopup(savedState)
12301243 self .showFlavourText = savedState .showFlavourText
12311244 self .showAnimations = savedState .showAnimations
12321245 self .showAllItemAffixes = savedState .showAllItemAffixes
1246+ self .disableScrollControlInteraction = savedState .disableScrollControlInteraction
12331247 self .dpiScaleOverridePercent = savedState .dpiScaleOverridePercent
12341248 SetDPIScaleOverridePercent (self .dpiScaleOverridePercent )
12351249 main :ClosePopup ()
0 commit comments