Add Rebler
This commit is contained in:
@@ -58,10 +58,12 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
canvas.Children.Add(_text);
|
||||
}
|
||||
|
||||
public bool Update(double x, double y, bool down) {
|
||||
var hover = Math.Sqrt(Math.Pow(CenterX - x, 2) + Math.Pow(CenterY - y, 2)) <= DIAMETER / 2;
|
||||
_circle?.Fill = hover ? Brushes.LightGray : Brushes.WhiteSmoke;
|
||||
return hover;
|
||||
public bool IsInside(double x, double y) {
|
||||
return Math.Sqrt(Math.Pow(CenterX - x, 2) + Math.Pow(CenterY - y, 2)) <= DIAMETER / 2;
|
||||
}
|
||||
|
||||
public void Update(bool isHovering, bool isPresed) {
|
||||
_circle?.Fill = isHovering ? Brushes.LightGray : Brushes.WhiteSmoke;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user