protected GuiComponent(GuiComponent parent) { this.Parent = parent; Manager = parent.Manager; Position = parent.GetInnerCanvasTopLeft(); Dimensions = new GuiDimensions(new Size(), new Size()); parent.RegisterChildComponent(this); }
/// <summary> /// used in dynamic positioned windows since the position of the parent may be determined after the /// calling of this components ctor /// </summary> public void AdjustWhenParentsReposition() { Position = Parent.GetInnerCanvasTopLeft() + Parent.Position + RelativePositionToParent; }