summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2008-04-11 23:57:58 +0000
committerYohann Ferreira <bertram@cegetel.net>2008-04-11 23:57:58 +0000
commit2fd5b9e2fea5f95f54e543011e2e8fb70f0b037f (patch)
tree0816bc586305a1f7d9a784410c9147ae3238fbc0
parent064d125c1de90888b0d4d4b53e0f74a3c65cb230 (diff)
downloadmana-client-2fd5b9e2fea5f95f54e543011e2e8fb70f0b037f.tar.gz
mana-client-2fd5b9e2fea5f95f54e543011e2e8fb70f0b037f.tar.bz2
mana-client-2fd5b9e2fea5f95f54e543011e2e8fb70f0b037f.tar.xz
mana-client-2fd5b9e2fea5f95f54e543011e2e8fb70f0b037f.zip
Removed the rhombs around the radio buttons.
-rw-r--r--src/gui/radiobutton.cpp19
-rw-r--r--src/gui/radiobutton.h6
2 files changed, 25 insertions, 0 deletions
diff --git a/src/gui/radiobutton.cpp b/src/gui/radiobutton.cpp
index 0ac4dea8..57d6772d 100644
--- a/src/gui/radiobutton.cpp
+++ b/src/gui/radiobutton.cpp
@@ -83,3 +83,22 @@ void RadioButton::drawBox(gcn::Graphics* graphics)
static_cast<Graphics*>(graphics)->drawImage(box, 2, 2);
}
}
+
+void RadioButton::draw(gcn::Graphics* graphics)
+{
+
+ graphics->pushClipArea(gcn::Rectangle(1,
+ 1,
+ getWidth() - 1,
+ getHeight() - 1));
+
+ drawBox(graphics);
+
+ graphics->popClipArea();
+
+ graphics->setFont(getFont());
+ graphics->setColor(getForegroundColor());
+
+ int h = getHeight() + getHeight() / 2;
+ graphics->drawText(getCaption(), h - 2, 0);
+}
diff --git a/src/gui/radiobutton.h b/src/gui/radiobutton.h
index 4f868fdb..3b97ad86 100644
--- a/src/gui/radiobutton.h
+++ b/src/gui/radiobutton.h
@@ -50,6 +50,12 @@ class RadioButton : public gcn::RadioButton {
*/
void drawBox(gcn::Graphics* graphics);
+ /**
+ * Implementation of the draw methods.
+ * Thus, avoiding the rhomb around the radio button.
+ */
+ void draw(gcn::Graphics* graphics);
+
private:
static int instances;
static Image *radioNormal;