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 -4
View File
@@ -62,10 +62,12 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
canvas.Children.Add(_text);
}
public bool Update(double x, double y, bool down) {
var hover = Math.Abs(x - CenterX) <= WIDTH / 2 && Math.Abs(y - CenterY) <= HEIGHT / 2;
_rect?.Fill = hover ? Brushes.LightGray : Brushes.WhiteSmoke;
return hover;
public bool IsInside(double x, double y) {
return Math.Abs(x - CenterX) <= WIDTH / 2 && Math.Abs(y - CenterY) <= HEIGHT / 2;
}
public void Update(bool isHovering, bool isPressed) {
_rect?.Fill = isHovering ? Brushes.LightGray : Brushes.WhiteSmoke;
}
}
}