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 | 12 | #include <HandData.h> |
| 13 | +#include <HFBackEvent.h> | |
| 14 | + | |
| 13 | 15 | #include "Application.h" |
| 16 | +#include "devices/MotionTracker.h" | |
| 14 | 17 | #include "devices/SixenseManager.h" |
| 15 | 18 | #include "ControllerScriptingInterface.h" |
| 16 | −#include "devices/MotionTracker.h" | |
| 19 | + | |
| 17 | 20 | |
| 18 | 21 | ControllerScriptingInterface::ControllerScriptingInterface() : |
| 19 | 22 | _mouseCaptured(false), |
| 20 | 23 | _touchCaptured(false), |
| 21 | 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 | 41 | const PalmData* ControllerScriptingInterface::getPrimaryPalm() const { |
| 27 | 42 | int leftPalmIndex, rightPalmIndex; |