public GuiWidget(HAnchor hAnchor = HAnchor.AbsolutePosition, VAnchor vAnchor = VAnchor.AbsolutePosition) { screenClipping = new ScreenClipping(this); children.CollectionChanged += children_CollectionChanged; LayoutEngine = new LayoutEngineSimpleAlign(); HAnchor = hAnchor; VAnchor = vAnchor; }
public GuiWidget(double width, double height, SizeLimitsToSet sizeLimits = SizeLimitsToSet.Minimum) : this(HAnchor.AbsolutePosition, VAnchor.AbsolutePosition) { screenClipping = new ScreenClipping(this); if ((sizeLimits & SizeLimitsToSet.Minimum) == SizeLimitsToSet.Minimum) { MinimumSize = new Vector2(width, height); } if ((sizeLimits & SizeLimitsToSet.Maximum) == SizeLimitsToSet.Maximum) { MaximumSize = new Vector2(width, height); } LocalBounds = new RectangleDouble(0, 0, width, height); }