@@ -119,6 +119,7 @@ function main:Init()
119119 self .showFlavourText = true
120120 self .showAnimations = true
121121 self .showAllItemAffixes = true
122+ self .compareJewelsOfSameType = false
122123 self .errorReadingSettings = false
123124
124125 if not SetDPIScaleOverridePercent then SetDPIScaleOverridePercent = function (scale ) end end
@@ -630,6 +631,9 @@ function main:LoadSettings(ignoreBuild)
630631 self .dpiScaleOverridePercent = tonumber (node .attrib .dpiScaleOverridePercent ) or 0
631632 SetDPIScaleOverridePercent (self .dpiScaleOverridePercent )
632633 end
634+ if node .attrib .compareJewelsOfSameType then
635+ self .compareJewelsOfSameType = node .attrib .compareJewelsOfSameType == " true"
636+ end
633637 end
634638 end
635639 end
@@ -762,6 +766,7 @@ function main:SaveSettings()
762766 showAnimations = tostring (self .showAnimations ),
763767 showAllItemAffixes = tostring (self .showAllItemAffixes ),
764768 dpiScaleOverridePercent = tostring (self .dpiScaleOverridePercent ),
769+ compareJewelsOfSameType = tostring (self .compareJewelsOfSameType ),
765770 } })
766771 local res , errMsg = common .xml .SaveXMLFile (setXML , self .userPath .. " Settings.xml" )
767772 if not res then
@@ -845,11 +850,12 @@ function main:OpenOptionsPopup(savedState)
845850 showFlavourText = self .showFlavourText ,
846851 showAnimations = self .showAnimations ,
847852 showAllItemAffixes = self .showAllItemAffixes ,
848- dpiScaleOverridePercent = self .dpiScaleOverridePercent
853+ dpiScaleOverridePercent = self .dpiScaleOverridePercent ,
854+ compareJewelsOfSameType = self .compareJewelsOfSameType
849855 }
850856
851857 -- NOTE: Height needs to be adjusted if more menu options are added
852- local oneColumnHeightReq = 850 -- Min height required to not split menu into two columns
858+ local oneColumnHeightReq = 876 -- Min height required to not split menu into two columns
853859 local columnWidth = 600
854860
855861 local startingY = 20
@@ -1114,7 +1120,14 @@ function main:OpenOptionsPopup(savedState)
11141120 end )
11151121 controls .invertSliderScrollDirection .tooltipText = " Default scroll direction is:\n Scroll Up = Move right\n Scroll Down = Move left"
11161122 controls .invertSliderScrollDirection .state = self .invertSliderScrollDirection
1117-
1123+
1124+ nextRow ()
1125+ controls .compareJewelsOfSameType = new (" CheckBoxControl" , { " TOPLEFT" , controls .sectionAnchor , " TOPLEFT" }, { currentX + defaultLabelPlacementX , currentY , 20 }, " ^7Compare jewels by type only:" , function (state )
1126+ self .compareJewelsOfSameType = state
1127+ end )
1128+ controls .compareJewelsOfSameType .tooltipText = " Only compare jewels against equipped jewels of the same base type. Empty jewel sockets are still shown."
1129+ controls .compareJewelsOfSameType .state = self .compareJewelsOfSameType
1130+
11181131 if launch .devMode then
11191132 nextRow ()
11201133 controls .disableDevAutoSave = new (" CheckBoxControl" , { " TOPLEFT" , controls .sectionAnchor , " TOPLEFT" }, { currentX + defaultLabelPlacementX , currentY , 20 }, " ^7Disable Dev AutoSave:" , function (state )
@@ -1193,6 +1206,7 @@ function main:OpenOptionsPopup(savedState)
11931206 self .showAllItemAffixes = savedState .showAllItemAffixes
11941207 self .dpiScaleOverridePercent = savedState .dpiScaleOverridePercent
11951208 SetDPIScaleOverridePercent (self .dpiScaleOverridePercent )
1209+ self .compareJewelsOfSameType = savedState .compareJewelsOfSameType
11961210 main :ClosePopup ()
11971211 end )
11981212
0 commit comments