summaryrefslogtreecommitdiff
path: root/src/gui/widgets/slider.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-03 19:30:43 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-03 19:30:43 +0300
commit9c3ba8303da72248d978696fc9363a2b47528b29 (patch)
tree354473f72b40e8db53c007cf9f9b92cdb2072068 /src/gui/widgets/slider.h
parentfea0de5f467181252909f7c2456362a9c9401b0d (diff)
downloadManaVerse-9c3ba8303da72248d978696fc9363a2b47528b29.tar.gz
ManaVerse-9c3ba8303da72248d978696fc9363a2b47528b29.tar.bz2
ManaVerse-9c3ba8303da72248d978696fc9363a2b47528b29.tar.xz
ManaVerse-9c3ba8303da72248d978696fc9363a2b47528b29.zip
add batch draw to slider.
Diffstat (limited to 'src/gui/widgets/slider.h')
-rw-r--r--src/gui/widgets/slider.h19
1 files changed, 14 insertions, 5 deletions
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.
*
@@ -66,11 +68,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.
*/
void mouseEntered(gcn::MouseEvent& event) override final;
@@ -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