From 5d67273f57570a8874f82c8057e9b77bbaafac79 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Fri, 20 Jan 2017 20:22:58 +0200 Subject: [PATCH] Add custom shortcuts for creating surfaces --- example-custom-shortcuts/src/ofApp.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/example-custom-shortcuts/src/ofApp.cpp b/example-custom-shortcuts/src/ofApp.cpp index 5daa820..0c40da5 100644 --- a/example-custom-shortcuts/src/ofApp.cpp +++ b/example-custom-shortcuts/src/ofApp.cpp @@ -22,6 +22,14 @@ void ofApp::keyPressed(int key){ mapper.setMode(ofxPiMapper::TEXTURE_MODE); }else if(key == '4'){ mapper.setMode(ofxPiMapper::SOURCE_MODE); + }else if(key == 'w'){ + mapper.createSurface(ofx::piMapper::QUAD_SURFACE); + }else if(key == 'e'){ + mapper.createSurface(ofx::piMapper::HEXAGON_SURFACE); + }else if(key == 'r'){ + mapper.createSurface(ofx::piMapper::GRID_WARP_SURFACE); + }else if(key == 't'){ + mapper.createSurface(ofx::piMapper::TRIANGLE_SURFACE); }else{ mapper.keyPressed(key); }