Example #1
0
        public override void Render()
        {
            Draw.Rect(transform.Position, width, height, color);
            Draw.RectOutline(transform.Position, width, height, OutlineColor);


            if (Text != "" && Text != null)
            {
                Vector2 indent = new Vector2((width / 2) - (Draw.DefaultFont.CharWidth * Text.Length), 0);
                if (indent.X < 0)
                {
                    indent = Vector2.Zero;
                }
                Draw.Text(Text, transform.Position + indent, new Vector2(2, 2));
            }

            if (Image != null)
            {
                Draw.SpriteBatch.Draw(Image, new Rectangle((int)transform.Position.X, (int)transform.Position.Y, width, height), Color.White);
            }

            //if (font != null)
            //    Draw.SpriteBatch.DrawString(font, Text, transform.Position, Color.White);
            base.Render();
        }
 public void Render()
 {
     if (m_children != null)
     {
         for (int i = 0; i < 4; i++)
         {
             m_children[i].Render();
         }
     }
     Draw.RectOutline(m_bounds, m_col);
 }
Example #3
0
 public override void DebugDraw()
 {
     base.DebugDraw();
     Draw.RectOutline(m_bounds, (m_others.Count == 0) ? Color.MonoGameOrange : Color.LimeGreen);
 }