@@ -14,6 +14,7 @@ local tradeHelpers = LoadModule("Classes/TradeHelpers")
1414local buySimilar = LoadModule (" Classes/CompareBuySimilar" )
1515local calcsHelpers = LoadModule (" Classes/CompareCalcsHelpers" )
1616local buildListHelpers = LoadModule (" Modules/BuildListHelpers" )
17+ local itemSlotHelper = LoadModule (" Modules/ItemSlotHelper" )
1718
1819-- Node IDs below this value are normal passive tree nodes; IDs at or above are cluster jewel nodes
1920local CLUSTER_NODE_OFFSET = 65536
@@ -3797,13 +3798,33 @@ function CompareTabClass:DrawItems(vp, compareEntry, inputEvents)
37973798 drawY = drawY + maxH + 6
37983799 else
37993800 -- === COMPACT MODE ===
3801+ local slot = self .primaryBuild .itemsTab .slots [equipSlotName ]
3802+ local nodeId = slot .nodeId
3803+ local shouldUnderline = not not nodeId
38003804 local pHover , cHover , b1Hover , b2Hover , b3Hover , b2X , b2Y , b2W , b2H ,
38013805 rowHoverItem , rowHoverItemsTab , rowHoverX , rowHoverY , rowHoverW , rowHoverH =
38023806 tradeHelpers .drawCompactSlotRow (drawY , label , pItem , cItem ,
38033807 colWidth , cursorX , cursorY , labelW ,
38043808 self .primaryBuild .itemsTab , compareEntry .itemsTab , pWarn , cWarn , slotMissing ,
3805- LAYOUT .itemsCopyBtnW , LAYOUT .itemsCopyBtnH , LAYOUT .itemsBuyBtnW , LAYOUT .itemsEquipBtnW , scrollOffsetX )
3806-
3809+ LAYOUT .itemsCopyBtnW , LAYOUT .itemsCopyBtnH , LAYOUT .itemsBuyBtnW , LAYOUT .itemsEquipBtnW , scrollOffsetX ,
3810+ shouldUnderline )
3811+
3812+ local labelX = (scrollOffsetX or 0 ) + 10
3813+ -- draw passive tree view when hovering over the label, if the slot is a jewel socket
3814+ if labelX <= cursorX and cursorX <= (labelX + labelW )
3815+ and drawY <= cursorY and cursorY <= (drawY + 20 ) then
3816+ if nodeId then
3817+ local boxSize = 250
3818+ -- anchor bottom left to label top left, keeping in mind what our viewport was
3819+ SetViewport ()
3820+ local boxX = vp .x + labelX
3821+ local boxY = (vp .y + checkboxOffset ) + drawY - boxSize
3822+ itemSlotHelper .DrawViewer (self .primaryBuild .itemsTab , nodeId , boxX , boxY , boxSize ,
3823+ boxSize )
3824+ -- restore viewport
3825+ SetViewport (vp .x , vp .y + checkboxOffset , vp .width , scrollViewH )
3826+ end
3827+ end
38073828 if rowHoverItem then
38083829 hoverItem = rowHoverItem
38093830 hoverItemsTab = rowHoverItemsTab
0 commit comments