summaryrefslogtreecommitdiff
path: root/src/gui/widgets/radiobutton.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-14 02:54:44 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-14 02:54:44 +0300
commit84499779fcf0c8b5392a88f1c9311775e692ebef (patch)
treef390326a50eed73d8f8c62107979a4d81093ce52 /src/gui/widgets/radiobutton.cpp
parent4ee30f47b491de0ace9b692072fd286cf12c7828 (diff)
downloadManaVerse-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.gz
ManaVerse-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.bz2
ManaVerse-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.xz
ManaVerse-84499779fcf0c8b5392a88f1c9311775e692ebef.zip
Improve a bit some gui controls speed.
Diffstat (limited to 'src/gui/widgets/radiobutton.cpp')
-rw-r--r--src/gui/widgets/radiobutton.cpp7
1 files changed, 3 insertions, 4 deletions
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);
}