Skip to content

Commit 522afcf

Browse files
LocalIdentityLocalIdentity
authored andcommitted
Add shortcut to copy node text from Passive Tree to the clipboard (PathOfBuildingCommunity#1211)
Copy of PathOfBuildingCommunity/PathOfBuilding#8635 Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent a0042dd commit 522afcf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Classes/PassiveTreeView.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
9999
self.showHeatMap = not self.showHeatMap
100100
elseif event.key == "d" and IsKeyDown("CTRL") then
101101
self.showStatDifferences = not self.showStatDifferences
102+
elseif event.key == "c" and IsKeyDown("CTRL") and self.hoverNode and self.hoverNode.type ~= "Socket" then
103+
local result = "# ".. self.hoverNode.dn .. "\n"
104+
for _, line in ipairs(self.hoverNode.sd) do
105+
result = result .. line .. "\n"
106+
end
107+
Copy(result)
102108
elseif event.key == "PAGEUP" then
103109
self:Zoom(IsKeyDown("SHIFT") and 3 or 1, viewPort)
104110
elseif event.key == "PAGEDOWN" then
@@ -1401,6 +1407,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
14011407
tooltip:AddLine(14, colorCodes.TIP.."Tip: Hold Shift or Ctrl to hide this tooltip.")
14021408
else
14031409
tooltip:AddLine(14, colorCodes.TIP.."Tip: Hold Ctrl to hide this tooltip.")
1410+
tooltip:AddLine(14, colorCodes.TIP.."Tip: Press Ctrl+C to copy this node's text.")
14041411
end
14051412
end
14061413

0 commit comments

Comments
 (0)