summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/slider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guichan/widgets/slider.cpp')
-rw-r--r--src/guichan/widgets/slider.cpp68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/guichan/widgets/slider.cpp b/src/guichan/widgets/slider.cpp
index eba88382c..f0eabd627 100644
--- a/src/guichan/widgets/slider.cpp
+++ b/src/guichan/widgets/slider.cpp
@@ -117,74 +117,6 @@ namespace gcn
mScaleEnd = scaleEnd;
}
- void Slider::draw(gcn::Graphics* graphics)
- {
- Color shadowColor = getBaseColor() - 0x101010;
- int alpha = getBaseColor().a;
- shadowColor.a = alpha;
-
- graphics->setColor(shadowColor);
- graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight()));
-
- drawMarker(graphics);
- }
-
- void Slider::drawMarker(gcn::Graphics* graphics)
- {
- gcn::Color faceColor = getBaseColor();
- Color highlightColor, shadowColor;
- int alpha = getBaseColor().a;
- highlightColor = faceColor + 0x303030;
- highlightColor.a = alpha;
- shadowColor = faceColor - 0x303030;
- shadowColor.a = alpha;
-
- graphics->setColor(faceColor);
-
- if (getOrientation() == HORIZONTAL)
- {
- int v = getMarkerPosition();
- graphics->fillRectangle(gcn::Rectangle(v + 1, 1,
- getMarkerLength() - 2, getHeight() - 2));
- graphics->setColor(highlightColor);
- graphics->drawLine(v, 0, v + getMarkerLength() - 1, 0);
- graphics->drawLine(v, 0, v, getHeight() - 1);
- graphics->setColor(shadowColor);
- graphics->drawLine(v + getMarkerLength() - 1, 1,
- v + getMarkerLength() - 1, getHeight() - 1);
- graphics->drawLine(v + 1, getHeight() - 1,
- v + getMarkerLength() - 1, getHeight() - 1);
-
- if (isFocused())
- {
- graphics->setColor(getForegroundColor());
- graphics->drawRectangle(Rectangle(v + 2, 2,
- getMarkerLength() - 4, getHeight() - 4));
- }
- }
- else
- {
- int v = (getHeight() - getMarkerLength()) - getMarkerPosition();
- graphics->fillRectangle(gcn::Rectangle(1, v + 1, getWidth() - 2,
- getMarkerLength() - 2));
- graphics->setColor(highlightColor);
- graphics->drawLine(0, v, 0, v + getMarkerLength() - 1);
- graphics->drawLine(0, v, getWidth() - 1, v);
- graphics->setColor(shadowColor);
- graphics->drawLine(1, v + getMarkerLength() - 1, getWidth() - 1,
- v + getMarkerLength() - 1);
- graphics->drawLine(getWidth() - 1, v + 1, getWidth() - 1,
- v + getMarkerLength() - 1);
-
- if (isFocused())
- {
- graphics->setColor(getForegroundColor());
- graphics->drawRectangle(Rectangle(2, v + 2, getWidth() - 4,
- getMarkerLength() - 4));
- }
- }
- }
-
void Slider::mousePressed(MouseEvent& mouseEvent)
{
if (mouseEvent.getButton() == gcn::MouseEvent::LEFT