public override void OnPaint() { if (Texture != null && TextureRect.Width > 0 && TextureRect.Height > 0) { UIRenderHelper.DrawSprite(Texture, Bounds, TextureRect); } }
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(); }