diff options
Diffstat (limited to 'src/guichan/widgets/checkbox.cpp')
-rw-r--r-- | src/guichan/widgets/checkbox.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/guichan/widgets/checkbox.cpp b/src/guichan/widgets/checkbox.cpp index 04423a6e9..89fee153e 100644 --- a/src/guichan/widgets/checkbox.cpp +++ b/src/guichan/widgets/checkbox.cpp @@ -78,57 +78,6 @@ namespace gcn adjustSize(); } - void CheckBox::draw(Graphics* graphics) - { - drawBox(graphics); - - graphics->setFont(getFont()); - graphics->setColor(getForegroundColor()); - - const int h = getHeight() + getHeight() / 2; - - graphics->drawText(getCaption(), h - 2, 0); - } - - void CheckBox::drawBox(Graphics *graphics) - { - const int h = getHeight() - 2; - const int alpha = getBaseColor().a; - Color faceColor = getBaseColor(); - faceColor.a = alpha; - Color highlightColor = faceColor + 0x303030; - highlightColor.a = alpha; - Color shadowColor = faceColor - 0x303030; - shadowColor.a = alpha; - - graphics->setColor(shadowColor); - graphics->drawLine(1, 1, h, 1); - graphics->drawLine(1, 1, 1, h); - - graphics->setColor(highlightColor); - graphics->drawLine(h, 1, h, h); - graphics->drawLine(1, h, h - 1, h); - - graphics->setColor(getBackgroundColor()); - graphics->fillRectangle(Rectangle(2, 2, h - 2, h - 2)); - - graphics->setColor(getForegroundColor()); - - if (isFocused()) - { - graphics->drawRectangle(Rectangle(0, 0, h + 2, h + 2)); - } - - if (mSelected) - { - graphics->drawLine(3, 5, 3, h - 2); - graphics->drawLine(4, 5, 4, h - 2); - - graphics->drawLine(5, h - 3, h - 2, 4); - graphics->drawLine(5, h - 4, h - 4, 5); - } - } - bool CheckBox::isSelected() const { return mSelected; |