Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-10-26 15:32:42 +0000
committerStijn Buys <ingar@osirion.org>2010-10-26 15:32:42 +0000
commit23c7d2c11170ee8736673e82a88e87a3d2e538f7 (patch)
treecd88e317a4f42391bc3567ed1881c160227cd3c6 /src/ui/slider.h
parent5189168482f32d8aac630cde27fc0999e70ed57b (diff)
enables ui::Slider mouse dragging, corrected a bug in ui::Widget coordinate mapping
Diffstat (limited to 'src/ui/slider.h')
-rw-r--r--src/ui/slider.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ui/slider.h b/src/ui/slider.h
index 46dfd50..bafd848 100644
--- a/src/ui/slider.h
+++ b/src/ui/slider.h
@@ -81,10 +81,19 @@ protected:
/// draw event handler
virtual void draw();
+ /// emit event handler
virtual bool on_emit(Widget *sender, const Event event, void *data=0);
+ /// keypress event handler
virtual bool on_keypress(const int key, const unsigned int modifier);
-
+
+ /// keyrelease event handler
+ virtual bool on_keyrelease(const int key, const unsigned int modifier);
+
+ virtual void on_mouseover(const math::Vector2f &cursor);
+
+ /// mouse movement handler
+ virtual void on_mousemove(const math::Vector2f &cursor);
private:
/// validate slider value
void validate();
@@ -92,6 +101,7 @@ private:
float slider_minimum;
float slider_maximum;
float slider_value;
+ bool slider_dragging;
Button *slider_minbutton;
Button *slider_decbutton;