public void UpdateChildContainerPosition(UiContainer container, Vector2 position) { if (ChildContainerPositions.ContainsKey(container)) { ChildContainerPositions[container] = position; } }
public void OffsetChildContainerPosition(UiContainer container, Vector2 position) { if (ChildContainerPositions.ContainsKey(container)) { ChildContainerPositions[container] += position; } }
public void AddChildContainer(UiContainer container, Vector2 relativePosition) { container.Parent = this; if (!ChildContainerPositions.ContainsKey(container)) { ChildContainerPositions.Add(container, relativePosition); } if (!ChildContainers.Contains(container)) { ChildContainers.Add(container); } }
// Support pixel positioning public virtual void AddChildContainer(UiContainer container) { AddChildContainer(container, new Vector2(container.DisplayRectangle.X, container.DisplayRectangle.Y)); }
public void AddChildContainer(UiContainer container, float childX, float atParentX, float childY, float atParentY) { AddChildContainer(container, ToRelativePositionAboutContainer(container.DisplayRectangle, childX, atParentX, childY, atParentY)); }