From 84499779fcf0c8b5392a88f1c9311775e692ebef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Sep 2012 02:54:44 +0300 Subject: Improve a bit some gui controls speed. --- src/gui/widgets/radiobutton.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/gui/widgets/radiobutton.cpp') diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index 21e318955..1daea1d1a 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -121,9 +121,9 @@ void RadioButton::drawBox(gcn::Graphics* graphics) const Image *box = nullptr; - if (isEnabled()) + if (mEnabled && isVisible()) { - if (isSelected()) + if (mSelected) if (mHasMouse) box = radioCheckedHi; else @@ -136,7 +136,7 @@ void RadioButton::drawBox(gcn::Graphics* graphics) } else { - if (isSelected()) + if (mSelected) box = radioDisabledChecked; else box = radioDisabled; @@ -152,7 +152,6 @@ void RadioButton::draw(gcn::Graphics* graphics) graphics->setFont(getFont()); graphics->setColor(getForegroundColor()); - graphics->drawText(getCaption(), 16, 0); } -- cgit v1.2.3-70-g09d2