History

Merge pull request #3673 from birarda/lobby

initial groundwork for lobby interface

Brad Hefta-Gaub committed 12 years ago

Commit 4e7e9642 parents b506a99 e2536dd36 files · +1298 −792Browse files

Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 36 files). Show all

Unified · Split

interface/src/scripting/ControllerScriptingInterface.cpp+16−1
@@ -10,18 +10,33 @@ · 9 unmodified lines
1010 //
1111
1212 #include <HandData.h>
13+#include <HFBackEvent.h>
14+
1315 #include "Application.h"
16+#include "devices/MotionTracker.h"
1417 #include "devices/SixenseManager.h"
1518 #include "ControllerScriptingInterface.h"
16−#include "devices/MotionTracker.h"
19+
1720
1821 ControllerScriptingInterface::ControllerScriptingInterface() :
1922 _mouseCaptured(false),
2023 _touchCaptured(false),
2124 _wheelCaptured(false)
2225 {
26+
2327 }
2428
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+}
2540
2641 const PalmData* ControllerScriptingInterface::getPrimaryPalm() const {
2742 int leftPalmIndex, rightPalmIndex;