public virtual void Draw(SpriteBatch spriteBatch) { if (this.Visible) { int childCount = this.ChildCount; for (int i = 0; i < this.ChildCount; i++) { if (this.ChildCount != childCount) { return; } UIView uIView = this.children[i]; if ((uIView.UpdateWhenOutOfBounds || uIView.InParent()) && uIView.Visible) { uIView.Draw(spriteBatch); } } } }
public virtual void Draw(SpriteBatch spriteBatch) { if (this.Visible) { int childCount = this.ChildCount; for (int i = 0; i < this.ChildCount; i++) { if (this.ChildCount != childCount) { return; } UIView uIView = this.children[i]; if ((uIView.UpdateWhenOutOfBounds || uIView.InParent()) && uIView.Visible) { uIView.Draw(spriteBatch); } } // Debug Draw UIView area. //if(Parent != null) //{ // spriteBatch.Draw(Main.magicPixel, new Rectangle((int)(Position.X + Parent.X), (int)(Position.Y + Parent.Y), (int)Width, (int)Height), foregroundColor * 0.6f); //} } }