aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/inputtypes.cpp
diff options
context:
space:
mode:
authorAntti Hölttä <AHoelttae@luxoft.com>2018-11-12 15:25:03 +0100
committerAntti Hölttä <AHoelttae@luxoft.com>2019-03-18 16:32:22 +0100
commit4e53c46500bdbe9f6fd7228f14b27fb7262b0350 (patch)
tree932b38e06cac020db92f60849f38ca4ef88aec85 /plugin/inputtypes.cpp
parentfbe75056a6ca179504b33c74d741c540f5b22dcd (diff)
CursorNavigationAttached now implements the control interface
CursorNavigationAttached now implements the functions for moving the cursor and for giving commands. This makes it possible to reassign the control keys, or use other input sources as well
Diffstat (limited to 'plugin/inputtypes.cpp')
-rw-r--r--plugin/inputtypes.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugin/inputtypes.cpp b/plugin/inputtypes.cpp
index 770b03d..344254b 100644
--- a/plugin/inputtypes.cpp
+++ b/plugin/inputtypes.cpp
@@ -13,6 +13,10 @@ CursorNavigationCommand::CursorNavigationCommand(float magnitude, int angle)
:magnitude(magnitude), angle(angle), action(NoAction)
{}
+CursorNavigationCommand::CursorNavigationCommand(Action a)
+ :magnitude(-1), angle(-1), action(a)
+{}
+
//test if this commands angle is between given angles. clockwise from begin to end
bool CursorNavigationCommand::angleIsBetween(int begin, int end) const
{