]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/gesturedetector.cpp
Tweak GestureDetector button and axis names
[libs/gui.git] / source / input / gesturedetector.cpp
index 296aab40f36bd4f715a0b579cb29e03ec1a123c1..145262a762ce438d03bb777ca1ed06fc325c7607 100644 (file)
@@ -28,7 +28,11 @@ GestureDetector::GestureDetector(Touchscreen &ts):
 
 string GestureDetector::get_button_name(unsigned btn) const
 {
-       if(btn==GESTURE_DRAG)
+       if(btn==GESTURE_TAP)
+               return "Tap";
+       else if(btn==GESTURE_TAP_2)
+               return "Two-finger tap";
+       else if(btn==GESTURE_DRAG)
                return "Drag";
        else if(btn==GESTURE_DRAG_2)
                return "Two-finger drag";
@@ -47,7 +51,9 @@ string GestureDetector::get_axis_name(unsigned axis) const
        else if(axis==1)
                return "Y";
        else if(axis==2)
-               return "Progress";
+               return "Delta X";
+       else if(axis==3)
+               return "Delta Y";
        else
                return Device::get_axis_name(axis);
 }
@@ -265,7 +271,8 @@ GestureDetector::TouchPoint::TouchPoint():
        down_x(0),
        down_y(0),
        x(0),
-       y(0)
+       y(0),
+       threshold_exceeded(false)
 { }
 
 } // namespace Input