@@ -908,13 +908,21 @@ holding Shift will put it in the second.]])
908908
909909 -- Section: Modifier Range
910910 self .controls .displayItemSectionRange = new (" Control" , {" TOPLEFT" ,self .controls .displayItemSectionCustom ," BOTTOMLEFT" }, {0 , 0 , 0 , function ()
911- return self .displayItem .rangeLineList [1 ] and 28 or 0
911+ if not self .displayItem or not self .displayItem .rangeLineList [1 ] then
912+ return 0
913+ end
914+ if main .showAllItemAffixes and self .displayItem .rarity == " UNIQUE" then
915+ local count = # self .displayItem .rangeLineList
916+ return count * 22 + 4
917+ else
918+ return 28
919+ end
912920 end })
913921 self .controls .displayItemRangeLine = new (" DropDownControl" , {" TOPLEFT" ,self .controls .displayItemSectionRange ," TOPLEFT" }, {0 , 0 , 350 , 18 }, nil , function (index , value )
914922 self .controls .displayItemRangeSlider .val = self .displayItem .rangeLineList [index ].range
915923 end )
916924 self .controls .displayItemRangeLine .shown = function ()
917- return self .displayItem and self .displayItem .rangeLineList [1 ] ~= nil
925+ return self .displayItem and self .displayItem .rangeLineList [1 ] ~= nil and not ( main . showAllItemAffixes and self . displayItem . rarity == " UNIQUE " )
918926 end
919927 self .controls .displayItemRangeSlider = new (" SliderControl" , {" LEFT" ,self .controls .displayItemRangeLine ," RIGHT" }, {8 , 0 , 100 , 18 }, function (val )
920928 self .displayItem .rangeLineList [self .controls .displayItemRangeLine .selIndex ].range = val
@@ -923,6 +931,34 @@ holding Shift will put it in the second.]])
923931 self :UpdateCustomControls ()
924932 end )
925933
934+ for i = 1 , 20 do
935+ local prevControl = i == 1 and self .controls .displayItemSectionRange or self .controls [" displayItemStackedRangeLine" .. (i - 1 )]
936+
937+ self .controls [" displayItemStackedRangeLine" .. i ] = new (" LabelControl" , {" TOPLEFT" ,prevControl ," TOPLEFT" }, {0 , function ()
938+ return i == 1 and 2 or 22
939+ end , 350 , 14 }, function ()
940+ if self .displayItem and self .displayItem .rangeLineList [i ] then
941+ return " ^7" .. self .displayItem .rangeLineList [i ].line
942+ end
943+ return " "
944+ end )
945+ self .controls [" displayItemStackedRangeLine" .. i ].shown = function ()
946+ return main .showAllItemAffixes and self .displayItem and self .displayItem .rarity == " UNIQUE" and self .displayItem .rangeLineList [i ] ~= nil
947+ end
948+
949+ self .controls [" displayItemStackedRangeSlider" .. i ] = new (" SliderControl" , {" LEFT" ,self .controls [" displayItemStackedRangeLine" .. i ]," RIGHT" }, {8 , 0 , 100 , 18 }, function (val )
950+ if self .displayItem and self .displayItem .rangeLineList [i ] then
951+ self .displayItem .rangeLineList [i ].range = val
952+ self .displayItem :BuildAndParseRaw ()
953+ self :UpdateDisplayItemTooltip ()
954+ self :UpdateCustomControls ()
955+ end
956+ end )
957+ self .controls [" displayItemStackedRangeSlider" .. i ].shown = function ()
958+ return self .controls [" displayItemStackedRangeLine" .. i ]:IsShown ()
959+ end
960+ end
961+
926962 -- Tooltip anchor
927963 self .controls .displayItemTooltipAnchor = new (" Control" , {" TOPLEFT" ,self .controls .displayItemSectionRange ," BOTTOMLEFT" })
928964
@@ -1879,8 +1915,11 @@ end
18791915function ItemsTabClass :UpdateDisplayItemRangeLines ()
18801916 if self .displayItem and self .displayItem .rangeLineList [1 ] then
18811917 wipeTable (self .controls .displayItemRangeLine .list )
1882- for _ , modLine in ipairs (self .displayItem .rangeLineList ) do
1918+ for i , modLine in ipairs (self .displayItem .rangeLineList ) do
18831919 t_insert (self .controls .displayItemRangeLine .list , modLine .line )
1920+ if self .controls [" displayItemStackedRangeSlider" .. i ] then
1921+ self .controls [" displayItemStackedRangeSlider" .. i ].val = modLine .range
1922+ end
18841923 end
18851924 self .controls .displayItemRangeLine .selIndex = 1
18861925 self .controls .displayItemRangeSlider .val = self .displayItem .rangeLineList [1 ].range
0 commit comments