From 9c3ba8303da72248d978696fc9363a2b47528b29 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 3 Nov 2013 19:30:43 +0300 Subject: add batch draw to slider. --- src/gui/widgets/slider.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/gui/widgets/slider.h') diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h index e54c9e374..79ef2b961 100644 --- a/src/gui/widgets/slider.h +++ b/src/gui/widgets/slider.h @@ -29,6 +29,8 @@ #include "localconsts.h" +class ImageCollection; + /** * Slider widget. Same as the Guichan slider but with custom look. * @@ -65,11 +67,6 @@ class Slider final : public gcn::Slider, */ void draw(gcn::Graphics *graphics) override final; - /** - * Draws the marker. - */ - void drawMarker(gcn::Graphics *const graphics) const; - /** * Called when the mouse enteres the widget area. */ @@ -80,8 +77,18 @@ class Slider final : public gcn::Slider, */ void mouseExited(gcn::MouseEvent& event) override final; + void mousePressed(gcn::MouseEvent &mouseEvent) override final; + + void mouseDragged(gcn::MouseEvent &mouseEvent) override final; + + void mouseWheelMovedUp(gcn::MouseEvent &mouseEvent) override final; + + void mouseWheelMovedDown(gcn::MouseEvent &mouseEvent) override final; + void keyPressed(gcn::KeyEvent& keyEvent) override final; + void setValue2(const double value); + enum SLIDER_ENUM { HSTART = 0, @@ -104,7 +111,9 @@ class Slider final : public gcn::Slider, static ImageRect buttons[2]; static float mAlpha; static int mInstances; + ImageCollection *mVertexes; bool mHasMouse; + bool mRedraw; }; #endif // GUI_WIDGETS_SLIDER_H -- cgit v1.2.3-60-g2f50