Browse Source

Add ofxPiMapper::undo()

master
Krisjanis Rijnieks 8 years ago
parent
commit
2d95ccc0a6
  1. 6
      src/Application/Application.cpp
  2. 1
      src/Application/Application.h
  3. 4
      src/ofxPiMapper.cpp
  4. 1
      src/ofxPiMapper.h

6
src/Application/Application.cpp

@ -136,7 +136,7 @@ void Application::onKeyPressed(ofKeyEventArgs & args){
break;
case 'z':
_cmdManager.undo();
undo();
break;
case 'n':
@ -537,5 +537,9 @@ void Application::moveTexCoord(int texCoordIndex, ofVec2f by){
}
}
void Application::undo(){
_cmdManager.undo();
}
} // namespace piMapper
} // namespace ofx

1
src/Application/Application.h

@ -131,6 +131,7 @@ class Application {
void moveTexCoord(int texCoordIndex, ofVec2f by);
// TODO: Add moveVertex.
// Make it so that other parts of the application react to the change.
void undo();
void setPreset(unsigned int i);
void setNextPreset();

4
src/ofxPiMapper.cpp

@ -202,6 +202,10 @@ void ofxPiMapper::toggleInfo(){
_application.toggleInfo();
}
void ofxPiMapper::undo(){
_application.undo();
}
void ofxPiMapper::setMode(ofx::piMapper::Mode m){
if(m == ofx::piMapper::PRESENTATION_MODE){
_application.setPresentationMode();

1
src/ofxPiMapper.h

@ -28,6 +28,7 @@ class ofxPiMapper {
// Application
void setInfoText(string text);
void toggleInfo();
void undo();
// Modes
void setMode(ofx::piMapper::Mode m);

Loading…
Cancel
Save