Add Rebler
This commit is contained in:
@@ -81,10 +81,12 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
canvas.Children.Add(_rect);
|
||||
}
|
||||
|
||||
public bool Update(double x, double y, bool down) {
|
||||
var hover = Math.Abs(x - CenterX) <= SIZE / 2 && Math.Abs(y - CenterY) <= SIZE / 2;
|
||||
_rect?.Stroke = hover ? Brushes.Black : Brushes.Black;
|
||||
return hover;
|
||||
public bool IsInside(double x, double y) {
|
||||
return Math.Abs(x - CenterX) <= SIZE / 2 && Math.Abs(y - CenterY) <= SIZE / 2;
|
||||
}
|
||||
|
||||
public void Update(bool isHovering, bool isPressed) {
|
||||
_rect?.Stroke = isHovering ? Brushes.Black : Brushes.Black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user