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.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/guichan/widgets/slider.cpp b/src/guichan/widgets/slider.cpp
index d7e8084cc..189ee6e7b 100644
--- a/src/guichan/widgets/slider.cpp
+++ b/src/guichan/widgets/slider.cpp
@@ -56,13 +56,11 @@
namespace gcn
{
- Slider::Slider(double scaleEnd)
+ Slider::Slider(double scaleEnd) :
+ mDragged(false),
+ mScaleStart(0),
+ mScaleEnd(scaleEnd)
{
- mDragged = false;
-
- mScaleStart = 0;
- mScaleEnd = scaleEnd;
-
setFocusable(true);
setFrameSize(1);
setOrientation(HORIZONTAL);
@@ -74,13 +72,11 @@ namespace gcn
addKeyListener(this);
}
- Slider::Slider(double scaleStart, double scaleEnd)
+ Slider::Slider(double scaleStart, double scaleEnd) :
+ mDragged(false),
+ mScaleStart(scaleStart),
+ mScaleEnd(scaleEnd)
{
- mDragged = false;
-
- mScaleStart = scaleStart;
- mScaleEnd = scaleEnd;
-
setFocusable(true);
setFrameSize(1);
setOrientation(HORIZONTAL);