protected override void OnDraw(GuiSpriteBatch graphics, GameTime gameTime) { base.OnDraw(graphics, gameTime); if (!Enabled) { graphics.FillRectangle(RenderBounds, DisabledBackground); } else { if (Focused) { graphics.FillRectangle(RenderBounds, FocusedBackground); if (FocusOutlineThickness != Thickness.Zero) { graphics.DrawRectangle(RenderBounds, FocusOutlineColor, FocusOutlineThickness, true); } } if (Highlighted) { graphics.FillRectangle(RenderBounds, HighlightedBackground); if (HighlightOutlineThickness != Thickness.Zero) { graphics.DrawRectangle(RenderBounds, HighlightOutlineColor, HighlightOutlineThickness, true); } } } }
protected override void OnDraw(GuiSpriteBatch graphics, GameTime gameTime) { base.OnDraw(graphics, gameTime); var bounds = RenderBounds; bounds.Inflate(1f, 1f); graphics.DrawRectangle(bounds, BorderColor, BorderThickness); }