RectangleF GetMyRectangle(UiContext context, RectangleF parentRectangle) { var myPos = context.AnchorPosition(parentRectangle, Anchor, X, Y, Width, Height); Update(context, myPos); myPos = AnimatedPosition(myPos); var myRect = new RectangleF(myPos.X, myPos.Y, Width, Height); return(myRect); }
public override void OnMouseClick(UiContext context, RectangleF parentRectangle) { if (!Visible) { return; } var myPos = context.AnchorPosition(parentRectangle, Anchor, X, Y, Width, Height); var myRectangle = new RectangleF(myPos.X, myPos.Y, Width, Height); foreach (var child in Children) { child.OnMouseClick(context, myRectangle); } }
public override void Render(UiContext context, RectangleF parentRectangle) { if (!Visible) { return; } var myPos = context.AnchorPosition(parentRectangle, Anchor, X, Y, Width, Height); var myRectangle = new RectangleF(myPos.X, myPos.Y, Width, Height); Background?.Draw(context, myRectangle); foreach (var child in Children) { child.Render(context, myRectangle); } }