Add Rebler

This commit is contained in:
2026-07-15 00:06:26 +02:00
parent 9baae02240
commit 4c9da5c9d5
12 changed files with 155 additions and 49 deletions
+6 -6
View File
@@ -106,17 +106,17 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
}
}
public ISet<INode> Update(double x, double y, bool down) {
HashSet<INode> hover = new();
public ISet<INode> GetHover(double x, double y) {
return Nodes.Where(n => n.IsInside(x, y)).ToHashSet();
}
public void Update(ISet<INode> hovering, bool isPressed) {
foreach (var e in Edges) {
e.Update();
}
foreach (var n in Nodes) {
if (n.Update(x, y, down)) {
hover.Add(n);
}
n.Update(hovering.Contains(n), isPressed);
}
return hover;
}
}
}