Example #1
0
 public override void OnPaint()
 {
     if (Texture != null && TextureRect.Width > 0 && TextureRect.Height > 0)
     {
         UIRenderHelper.DrawSprite(Texture, Bounds, TextureRect);
     }
 }
Example #2
0
        public override void OnPaint()
        {
            if (Selected && SelectedSprite.Width > 0)
            {
                UIRenderHelper.DrawSprite(Texture, Bounds, SelectedSprite);
            }
            else if (IsMouseOver && OverSprite.Width > 0)
            {
                UIRenderHelper.DrawSprite(Texture, Bounds, OverSprite);
            }
            else if (NormalSprite.Width > 0)
            {
                UIRenderHelper.DrawSprite(Texture, Bounds, NormalSprite);
            }

            base.OnPaint();
        }