Browse Source

Add ofxPiMapper::toggleShift method

master
Krisjanis Rijnieks 8 years ago
parent
commit
211992c265
  1. 7
      src/Application/Application.cpp
  2. 1
      src/Application/Application.h
  3. 4
      src/ofxPiMapper.cpp
  4. 1
      src/ofxPiMapper.h

7
src/Application/Application.cpp

@ -102,7 +102,7 @@ void Application::onKeyPressed(ofKeyEventArgs & args){
break;
case '/':
_shiftKeyDown = !_shiftKeyDown;
toggleShift();
break;
case '1':
@ -231,6 +231,11 @@ bool Application::isShiftKeyDown(){
return _shiftKeyDown;
}
bool Application::toggleShift(){
_shiftKeyDown = !_shiftKeyDown;
return _shiftKeyDown;
}
void Application::setPreset(unsigned int i){
_cmdManager.exec(new SetPresetCmd(this, i));
}

1
src/Application/Application.h

@ -96,6 +96,7 @@ class Application {
bool loadXmlSettings(std::string fileName);
bool isShiftKeyDown();
bool toggleShift();
SurfaceManager * getSurfaceManager(){ return &_surfaceManager; }
CmdManager * getCmdManager(){ return &_cmdManager; }

4
src/ofxPiMapper.cpp

@ -234,6 +234,10 @@ void ofxPiMapper::deselect(){
_application.deselect();
}
bool ofxPiMapper::toggleShift(){
return _application.toggleShift();
}
void ofxPiMapper::setMode(ofx::piMapper::Mode m){
if(m == ofx::piMapper::PRESENTATION_MODE){
_application.setPresentationMode();

1
src/ofxPiMapper.h

@ -32,6 +32,7 @@ class ofxPiMapper {
void toggleInfo();
void undo();
void deselect();
bool toggleShift();
// Modes
void setMode(ofx::piMapper::Mode m);

Loading…
Cancel
Save