Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/slider.cc6
-rw-r--r--src/ui/slider.h6
2 files changed, 11 insertions, 1 deletions
diff --git a/src/ui/slider.cc b/src/ui/slider.cc
index 24e59f5..559df70 100644
--- a/src/ui/slider.cc
+++ b/src/ui/slider.cc
@@ -178,6 +178,12 @@ void Slider::on_mouseover(const math::Vector2f &cursor)
slider_dragging = false;
}
+void Slider::show()
+{
+ Widget::show();
+ resize();
+}
+
void Slider::resize()
{
// note: slider expects width > height
diff --git a/src/ui/slider.h b/src/ui/slider.h
index bafd848..70a57ac 100644
--- a/src/ui/slider.h
+++ b/src/ui/slider.h
@@ -73,8 +73,12 @@ public:
* @see maximum
*/
void set_range(const float minimum, const float maximum);
-
+
+ /// show the widget
+ virtual void show();
+
protected:
+
/// resize event handler
virtual void resize();