Browse Source

Add example-custom-shorcuts base source files

master
Krisjanis Rijnieks 9 years ago
parent
commit
4687e756ce
  1. 7
      example-custom-shortcuts/src/main.cpp
  2. 34
      example-custom-shortcuts/src/ofApp.cpp
  3. 20
      example-custom-shortcuts/src/ofApp.h

7
example-custom-shortcuts/src/main.cpp

@ -0,0 +1,7 @@
#include "ofMain.h"
#include "ofApp.h"
int main(){
ofSetupOpenGL(800, 450, OF_WINDOW);
ofRunApp(new ofApp());
}

34
example-custom-shortcuts/src/ofApp.cpp

@ -0,0 +1,34 @@
#include "ofApp.h"
void ofApp::setup(){
ofBackground(0);
piMapper.setup();
}
void ofApp::update(){
piMapper.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::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);
}

20
example-custom-shortcuts/src/ofApp.h

@ -0,0 +1,20 @@
#pragma once
#include "ofMain.h"
#include "ofxPiMapper.h"
class ofApp : public ofBaseApp {
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
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