public static Rect AddRectangle(this IControlContainer container, float x, float y, int w, int h, Color?fillColor = null, Color?borderColor = null) => container.AddControlPassThrough(new Rect(container, x, y, w, h) { BorderColor = borderColor, BackgroundColor = fillColor, });
public static Line AddLine(this IControlContainer container, int x1, int y1, int x2, int y2, int thickness = 1) => container.AddControlPassThrough(new Line(container, x1, y1, x2, y2, thickness));
public static Line AddLine(this IControlContainer container, float x1, float y1, float x2, float y2, int thickness = 1) => container.AddControlPassThrough(new Line(container, (int)x1, (int)y1, (int)x2, (int)y2, thickness));
public static TextBox AddTextBox(this IControlContainer container, float x, float y, int width, string text = "", int fontIndex = 0) => container.AddControlPassThrough(new TextBox(container, x, y, width) { Text = text, FontIndex = fontIndex });