public void AddView(View child) { if (viewList.IsNull()) { viewList = new ViewList(); } if (child.parent != null) { parent.RemoveView(child); } viewList.Add(child); child.parent = this; }
public View(float x, float y, float width, float height) { this.x = x; this.y = y; this.width = width; this.height = height; rotation = 0; rotationCenterX = 0; rotationCenterY = 0; scaleX = 1.0f; scaleY = 1.0f; color = Color.White; //solidOpaqueRGBA; translateX = 0; translateY = 0; parentAlignX = parentAlignY = alignX = alignY = ALIGN_MIN; parent = null; viewList = ViewList.Null; visible = enabled = true; }