@@ -814,13 +814,21 @@ holding Shift will put it in the second.]])
814814
815815 -- Section: Modifier Range
816816 self .controls .displayItemSectionRange = new (" Control" , {" TOPLEFT" ,self .controls .displayItemSectionCustom ," BOTTOMLEFT" }, {0 , 0 , 0 , function ()
817- return self .displayItem .rangeLineList [1 ] and 28 or 0
817+ if not self .displayItem or not self .displayItem .rangeLineList [1 ] then
818+ return 0
819+ end
820+ if main .showAllItemAffixes and self .displayItem .rarity == " UNIQUE" then
821+ local count = # self .displayItem .rangeLineList
822+ return count * 22 + 4
823+ else
824+ return 28
825+ end
818826 end })
819827 self .controls .displayItemRangeLine = new (" DropDownControl" , {" TOPLEFT" ,self .controls .displayItemSectionRange ," TOPLEFT" }, {0 , 0 , 350 , 18 }, nil , function (index , value )
820828 self .controls .displayItemRangeSlider .val = self .displayItem .rangeLineList [index ].range
821829 end )
822830 self .controls .displayItemRangeLine .shown = function ()
823- return self .displayItem and self .displayItem .rangeLineList [1 ] ~= nil
831+ return self .displayItem and self .displayItem .rangeLineList [1 ] ~= nil and not ( main . showAllItemAffixes and self . displayItem . rarity == " UNIQUE " )
824832 end
825833 self .controls .displayItemRangeSlider = new (" SliderControl" , {" LEFT" ,self .controls .displayItemRangeLine ," RIGHT" }, {8 , 0 , 100 , 18 }, function (val )
826834 self .displayItem .rangeLineList [self .controls .displayItemRangeLine .selIndex ].range = val
@@ -829,6 +837,34 @@ holding Shift will put it in the second.]])
829837 self :UpdateCustomControls ()
830838 end )
831839
840+ for i = 1 , 20 do
841+ local baseControl = i == 1 and self .controls .displayItemSectionRange or self .controls [" displayItemStackedRangeSlider" .. (i - 1 )]
842+
843+ self .controls [" displayItemStackedRangeSlider" .. i ] = new (" SliderControl" , {" TOPLEFT" ,baseControl ," TOPLEFT" }, {0 , function ()
844+ return i == 1 and 2 or 22
845+ end , 100 , 18 }, function (val )
846+ if self .displayItem and self .displayItem .rangeLineList [i ] then
847+ self .displayItem .rangeLineList [i ].range = val
848+ self .displayItem :BuildAndParseRaw ()
849+ self :UpdateDisplayItemTooltip ()
850+ self :UpdateCustomControls ()
851+ end
852+ end )
853+ self .controls [" displayItemStackedRangeLine" .. i ] = new (" LabelControl" , {" LEFT" ,self .controls [" displayItemStackedRangeSlider" .. i ]," RIGHT" }, {8 , - 2 , 350 , 14 }, function ()
854+ if self .displayItem and self .displayItem .rangeLineList [i ] then
855+ return " ^7" .. self .displayItem .rangeLineList [i ].line
856+ end
857+ return " "
858+ end )
859+ self .controls [" displayItemStackedRangeSlider" .. i ].shown = function ()
860+ return main .showAllItemAffixes and self .displayItem and self .displayItem .rarity == " UNIQUE" and self .displayItem .rangeLineList [i ] ~= nil
861+ end
862+
863+ self .controls [" displayItemStackedRangeLine" .. i ].shown = function ()
864+ return self .controls [" displayItemStackedRangeSlider" .. i ]:IsShown ()
865+ end
866+ end
867+
832868 -- Tooltip anchor
833869 self .controls .displayItemTooltipAnchor = new (" Control" , {" TOPLEFT" ,self .controls .displayItemSectionRange ," BOTTOMLEFT" })
834870
@@ -1793,7 +1829,10 @@ end
17931829function ItemsTabClass :UpdateDisplayItemRangeLines ()
17941830 if self .displayItem and self .displayItem .rangeLineList [1 ] then
17951831 wipeTable (self .controls .displayItemRangeLine .list )
1796- for _ , modLine in ipairs (self .displayItem .rangeLineList ) do
1832+ for i , modLine in ipairs (self .displayItem .rangeLineList ) do
1833+ if self .controls [" displayItemStackedRangeSlider" .. i ] then
1834+ self .controls [" displayItemStackedRangeSlider" .. i ].val = modLine .range
1835+ end
17971836 -- primarily for Against the Darkness // a way to cut down on really long modLines, gsub could be updated for others
17981837 t_insert (self .controls .displayItemRangeLine .list , (modLine .line :gsub (" Passive Skills in Radius also grant" , " :" )))
17991838 end
0 commit comments