From 92b125e460979dd42aa88d5ad8699fe81589e3bf Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Sat, 4 Feb 2017 13:29:15 +0100 Subject: [PATCH] Add ofApp::handleJoystick() placeholder --- example-gamepad/src/ofApp.cpp | 17 +++++++++++++++++ example-gamepad/src/ofApp.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/example-gamepad/src/ofApp.cpp b/example-gamepad/src/ofApp.cpp index 9d3b042..1db0462 100644 --- a/example-gamepad/src/ofApp.cpp +++ b/example-gamepad/src/ofApp.cpp @@ -34,3 +34,20 @@ void ofApp::mouseDragged(int x, int y, int button){ void ofApp::mouseReleased(int x, int y, int button){ mapper.mouseReleased(x, y, button); } + +/* These values we take into consideration + + ↖ ↑ ↗ y + ← → -- x b + ↙ ↓ ↘ a + +*/ +void ofApp::handleJoystick(){ + if("value" == "left"){ + + }else if("value" == "leftup"){ + + }else if("value" == "A"){ + + } +} diff --git a/example-gamepad/src/ofApp.h b/example-gamepad/src/ofApp.h index 4e71e25..2da2a9b 100644 --- a/example-gamepad/src/ofApp.h +++ b/example-gamepad/src/ofApp.h @@ -16,6 +16,8 @@ class ofApp : public ofBaseApp { void mousePressed(int x, int y, int button); void mouseDragged(int x, int y, int button); void mouseReleased(int x, int y, int button); + + void handleJoystick(); ofxPiMapper mapper; }; \ No newline at end of file