initial groundwork for lobby interface
Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 36 files). Show all
Unified · Split
| @@ -10,18 +10,33 @@ · 9 unmodified lines | |||
| 10 | // | 10 | // |
| 11 | 11 | ||
| 12 | #include <HandData.h> | 12 | #include <HandData.h> |
| 13 | #include <HFBackEvent.h> | ||
| 14 | |||
| 13 | #include "Application.h" | 15 | #include "Application.h" |
| 16 | #include "devices/MotionTracker.h" | ||
| 14 | #include "devices/SixenseManager.h" | 17 | #include "devices/SixenseManager.h" |
| 15 | #include "ControllerScriptingInterface.h" | 18 | #include "ControllerScriptingInterface.h" |
| 16 | #include "devices/MotionTracker.h" | 19 | |
| 17 | 20 | ||
| 18 | ControllerScriptingInterface::ControllerScriptingInterface() : | 21 | ControllerScriptingInterface::ControllerScriptingInterface() : |
| 19 | _mouseCaptured(false), | 22 | _mouseCaptured(false), |
| 20 | _touchCaptured(false), | 23 | _touchCaptured(false), |
| 21 | _wheelCaptured(false) | 24 | _wheelCaptured(false) |
| 22 | { | 25 | { |
| 26 | |||
| 23 | } | 27 | } |
| 24 | 28 | ||
| 29 | void ControllerScriptingInterface::handleMetaEvent(HFMetaEvent* event) { | ||
| 30 | if (event->type() == HFActionEvent::startType()) { | ||
| 31 | emit actionStartEvent(static_cast<HFActionEvent&>(*event)); | ||
| 32 | } else if (event->type() == HFActionEvent::endType()) { | ||
| 33 | emit actionEndEvent(static_cast<HFActionEvent&>(*event)); | ||
| 34 | } else if (event->type() == HFBackEvent::startType()) { | ||
| 35 | emit backStartEvent(); | ||
| 36 | } else if (event->type() == HFBackEvent::endType()) { | ||
| 37 | emit backEndEvent(); | ||
| 38 | } | ||
| 39 | } | ||
| 25 | 40 | ||
| 26 | const PalmData* ControllerScriptingInterface::getPrimaryPalm() const { | 41 | const PalmData* ControllerScriptingInterface::getPrimaryPalm() const { |
| 27 | int leftPalmIndex, rightPalmIndex; | 42 | int leftPalmIndex, rightPalmIndex; |