@@ -65,6 +65,7 @@ local PassiveTreeViewClass = newClass("PassiveTreeView", function(self)
6565 self .searchStrCached = " "
6666 self .searchStrResults = {}
6767 self .showStatDifferences = true
68+ self .toHRingMode = nil -- nil | true (planning toggle: show all Variable rings)
6869 self .hoverNode = nil
6970end )
7071
@@ -116,6 +117,15 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
116117 end
117118 elseif event .key == " p" then
118119 self .showHeatMap = not self .showHeatMap
120+ elseif event .key == " t" then
121+ -- Toggle Thread of Hope all-rings planning view
122+ self .toHRingMode = not self .toHRingMode or nil
123+ if not main .toHHintDismissed then
124+ main .toHHintDismissed = true
125+ main :SaveSettings ()
126+ end
127+ build .spec :BuildAllDependsAndPaths ()
128+ build .buildFlag = true
119129 elseif event .key == " d" and IsKeyDown (" CTRL" ) then
120130 self .showStatDifferences = not self .showStatDifferences
121131 elseif event .key == " c" and IsKeyDown (" CTRL" ) and self .hoverNode and self .hoverNode .type ~= " Socket" then
@@ -635,6 +645,35 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
635645 end
636646 end
637647
648+ -- One pass over allocated jewel sockets: detects whether any Variable-radius jewel is
649+ -- socketed (used to gate the first-time hint), and when the planning toggle is on, builds
650+ -- a nodeId -> ring colour tint map. First-seen wins when sockets overlap; rings within one
651+ -- socket are non-overlapping so per-socket order is deterministic.
652+ local toHTintMap = self .toHRingMode and { } or nil
653+ local hasVariableJewel = false
654+ for socketNodeId , itemId in pairs (spec .jewels ) do
655+ if itemId ~= 0 and spec .allocNodes [socketNodeId ] then
656+ local item = build .itemsTab .items [itemId ]
657+ local socketNode = spec .nodes [socketNodeId ]
658+ if item and item .jewelRadiusLabel == " Variable" then
659+ hasVariableJewel = true
660+ if toHTintMap and socketNode and socketNode .nodesInRadius then
661+ for ringIdx = 6 , 10 do
662+ local nodesInRing = socketNode .nodesInRadius [ringIdx ]
663+ local radData = build .data .jewelRadius [ringIdx ]
664+ if nodesInRing and radData then
665+ for nId in pairs (nodesInRing ) do
666+ if not toHTintMap [nId ] then
667+ toHTintMap [nId ] = radData .col
668+ end
669+ end
670+ end
671+ end
672+ end
673+ end
674+ end
675+ end
676+
638677 -- Draw the nodes
639678 for nodeId , node in pairs (spec .nodes ) do
640679 -- Determine the base and overlay images for this node based on type and state
@@ -850,11 +889,13 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
850889 if overlay then
851890 -- Draw overlay
852891 if node .type ~= " ClassStart" and node .type ~= " AscendClassStart" then
892+ local hoverTinted = false
853893 if hoverNode and hoverNode ~= node then
854894 -- Mouse is hovering over a different node
855895 if hoverDep and hoverDep [node ] then
856896 -- This node depends on the hover node, turn it red
857897 SetDrawColor (1 , 0 , 0 )
898+ hoverTinted = true
858899 elseif hoverNode .type == " Socket" and hoverNode .nodesInRadius then
859900 -- Hover node is a socket, check if this node falls within its radius and color it accordingly
860901 local socket , jewel = build .itemsTab :GetSocketAndJewelForNodeID (hoverNode .id )
@@ -866,6 +907,7 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
866907 -- Draw Thread of Hope's annuli
867908 if data .inner ~= 0 then
868909 SetDrawColor (data .col )
910+ hoverTinted = true
869911 break
870912 end
871913 end
@@ -877,13 +919,18 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
877919 -- Draw normal jewel radii
878920 if data .inner == 0 then
879921 SetDrawColor (data .col )
922+ hoverTinted = true
880923 break
881924 end
882925 end
883926 end
884927 end
885928 end
886929 end
930+ if not hoverTinted and toHTintMap and toHTintMap [nodeId ] then
931+ -- Planning toggle is on: tint nodes by the Thread of Hope ring they sit in
932+ SetDrawColor (toHTintMap [nodeId ])
933+ end
887934 end
888935 self :DrawAsset (tree .assets [overlay ], scrX , scrY , scale )
889936 SetDrawColor (1 , 1 , 1 )
@@ -959,7 +1006,18 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
9591006 end
9601007 end
9611008 elseif node .alloc then
962- if jewel and jewel .jewelRadiusIndex then
1009+ if self .toHRingMode and jewel and jewel .jewelRadiusLabel == " Variable" then
1010+ -- Planning toggle: draw all five Variable-radius annuli around the socket
1011+ for _ , radData in ipairs (build .data .jewelRadius ) do
1012+ local outerSize = radData .outer * scale
1013+ local innerSize = radData .inner * scale
1014+ if innerSize ~= 0 then
1015+ SetDrawColor (radData .col )
1016+ DrawImage (self .ring , scrX - outerSize , scrY - outerSize , outerSize * 2 , outerSize * 2 )
1017+ DrawImage (self .ring , scrX - innerSize , scrY - innerSize , innerSize * 2 , innerSize * 2 )
1018+ end
1019+ end
1020+ elseif jewel and jewel .jewelRadiusIndex then
9631021 -- Draw only the selected jewel radius
9641022 local radData = build .data .jewelRadius [jewel .jewelRadiusIndex ]
9651023 local outerSize = radData .outer * scale
@@ -1006,6 +1064,14 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
10061064 end
10071065 end
10081066 end
1067+
1068+ -- First-time hint: shown only while the toggle is off, the user has never pressed T,
1069+ -- and the build has at least one allocated Variable-radius jewel.
1070+ if hasVariableJewel and not self .toHRingMode and not main .toHHintDismissed then
1071+ SetDrawLayer (nil , 100 )
1072+ DrawString (viewPort .x + 12 , viewPort .y + 12 , " LEFT" , 18 , " FONTIN" ,
1073+ " ^xFFCC00Tip: ^7Press ^xFFCC00T^7 to view all Thread of Hope ring sizes." )
1074+ end
10091075end
10101076function PassiveTreeViewClass :DrawImageRotated (handle , x , y , width , height , angle , ...)
10111077 if main .showAnimations == false then
0 commit comments