protected override void PaintComponent() { base.PaintComponent(); // Draw the radio button part if (mouseDown && enabled) { // Use disabled color to display pressed down action UI2DRenderer.FillCircle(center, radius - 1, disabledColor); } else if (selected) { Color c = (enabled) ? buttonColor : disabledColor; UI2DRenderer.DrawCircle(center, radius - 1, c); UI2DRenderer.DrawCircle(center, radius - 2, c); UI2DRenderer.FillCircle(center, radius - 3, selectedColor); } else { Color c = (enabled) ? buttonColor : disabledColor; UI2DRenderer.FillCircle(center, radius - 1, c); } // Draw the border of the check box part UI2DRenderer.DrawCircle(center, radius, color); // Show the highlight when mouse is over if (enabled && within && !mouseDown) { UI2DRenderer.DrawCircle(center, radius - 1, highlightColor); UI2DRenderer.DrawCircle(center, radius - 2, highlightColor); } if (label.Length > 0 && textFont != null) { UI2DRenderer.WriteText(textPos, label, textColor, textFont); } }