Browse Source

Add key and mouse event forwarding

master
Krisjanis Rijnieks 8 years ago
parent
commit
a8c4e44d39
  1. 22
      example-camera/src/ofApp.cpp
  2. 7
      example-camera/src/ofApp.h

22
example-camera/src/ofApp.cpp

@ -13,4 +13,24 @@ void ofApp::update(){
void ofApp::draw(){
piMapper.draw();
}
}
void ofApp::keyPressed(int key){
piMapper.keyPressed(key);
}
void ofApp::keyReleased(int key){
piMapper.keyReleased(key);
}
void ofApp::mousePressed(int x, int y, int button){
piMapper.mousePressed(x, y, button);
}
void ofApp::mouseDragged(int x, int y, int button){
piMapper.mouseDragged(x, y, button);
}
void ofApp::mouseReleased(int x, int y, int button){
piMapper.mouseReleased(x, y, button);
}

7
example-camera/src/ofApp.h

@ -18,6 +18,13 @@ class ofApp : public ofBaseApp {
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mousePressed(int x, int y, int button);
void mouseDragged(int x, int y, int button);
void mouseReleased(int x, int y, int button);
ofxPiMapper piMapper;
CameraSource * cameraSource;

Loading…
Cancel
Save