summaryrefslogtreecommitdiff
path: root/src/gui/radiobutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/radiobutton.cpp')
-rw-r--r--src/gui/radiobutton.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/radiobutton.cpp b/src/gui/radiobutton.cpp
index 5f929e62..619ec84f 100644
--- a/src/gui/radiobutton.cpp
+++ b/src/gui/radiobutton.cpp
@@ -81,3 +81,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);
+}