Browse Source

Update example

Pass mouse events to ofxPiMapper. A way to disable mouse functionality would be not passing
mouse events to ofxPiMapper. Maybe you don't need mouse functionality. Maybe it is for you.
master
Krisjanis Rijnieks 9 years ago
parent
commit
6928d73d0f
  1. 12
      example/src/ofApp.cpp
  2. 4
      example/src/ofApp.h

12
example/src/ofApp.cpp

@ -30,3 +30,15 @@ void ofApp::update(){
void ofApp::draw(){
piMapper.draw();
}
void ofApp::mousePressed(int x, int y, int button){
piMapper.mousePressed(x, y, button);
}
void ofApp::mouseReleased(int x, int y, int button){
piMapper.mouseReleased(x, y, button);
}
void ofApp::mouseDragged(int x, int y, int button){
piMapper.mouseDragged(x, y, button);
}

4
example/src/ofApp.h

@ -12,6 +12,10 @@ class ofApp : public ofBaseApp {
void setup();
void update();
void draw();
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void mouseDragged(int x, int y, int button);
ofxPiMapper piMapper;

Loading…
Cancel
Save