Пример #1
0
		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;
		}
Пример #2
0
		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);
		}