]> git.tdb.fi Git - libs/gui.git/commitdiff
Tweak GestureDetector button and axis names
authorMikko Rasa <tdb@tdb.fi>
Mon, 19 Sep 2016 17:51:32 +0000 (20:51 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 19 Sep 2016 17:51:32 +0000 (20:51 +0300)
Tap gesture buttons were missing names and the progress axis was outdated.

source/input/gesturedetector.cpp

index 49ddba2b8478173dfbd65b9e80233ab356c0da03..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);
 }