@@ -35,6 +35,16 @@ local CalcsTabClass = newClass("CalcsTab", "UndoHandler", "ControlHost", "Contro
3535 self .controls .search = new (" EditControl" , {" TOPLEFT" ,self ," TOPLEFT" }, {4 , 5 , 260 , 20 }, " " , " Search" , " %c" , 100 , nil , nil , nil , true )
3636 t_insert (self .controls , self .controls .search )
3737
38+
39+ self .controls .clearSidebarLabel = new (" LabelControl" , {" TOPLEFT" , self , " TOPLEFT" }, {425 , 5 , 150 , 18 }, " Right-click any Calcs value to pin/unpin it to the sidebar." )
40+ self .controls .clearSideBarPinnedStats = new (" ButtonControl" , {" TOPLEFT" , self , " TOPLEFT" }, {270 , 5 , 150 , 20 }, " Clear Pinned Stats" , function ()
41+ if self .sidebarPinnedStats and # self .sidebarPinnedStats > 0 then
42+ self :ClearSidebarPinnedStats ()
43+ return
44+ end
45+
46+ end )
47+
3848 -- Special section for skill/mode selection
3949 self :NewSection (3 , " SkillSelect" , 1 , colorCodes .NORMAL , {{ defaultCollapsed = false , label = " View Skill Details" , data = {
4050 { label = " Socket Group" , { controlName = " mainSocketGroup" ,
@@ -411,7 +421,7 @@ function CalcsTabClass:SetDisplayStat(displayData, pin)
411421 self .controls .breakdown :SetBreakdownData (displayData , pin )
412422end
413423
414- function CalcsTabClass :AddSidebarPinnedStat (displayData )
424+ function CalcsTabClass :ToggleSidebarPinnedStat (displayData )
415425 if not displayData or not displayData .format then
416426 return
417427 end
@@ -436,6 +446,14 @@ function CalcsTabClass:AddSidebarPinnedStat(displayData)
436446
437447 self .build :RefreshStatList ()
438448end
449+
450+ function CalcsTabClass :ClearSidebarPinnedStats ()
451+ if not self .sidebarPinnedStats or # self .sidebarPinnedStats == 0 then
452+ return
453+ end
454+ wipeTable (self .sidebarPinnedStats )
455+ self .build :RefreshStatList ()
456+ end
439457function CalcsTabClass :CheckFlag (obj )
440458 local actor = self .input .showMinion and self .calcsEnv .minion or self .calcsEnv .player
441459 local skillFlags = actor .mainSkill .activeEffect .statSetCalcs .skillFlags
0 commit comments