Browse Source

Add ofxPiMapper::deselect()

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

6
src/Application/Application.cpp

@ -541,5 +541,11 @@ void Application::undo(){
_cmdManager.undo();
}
void Application::deselect(){
if(getSurfaceManager()->getSelectedSurface() != 0){
getCmdManager()->exec(new DeselectSurfaceCmd(getSurfaceManager()));
}
}
} // namespace piMapper
} // namespace ofx

2
src/Application/Application.h

@ -36,6 +36,7 @@
#include "ToggleAnimatedSourceCmd.h"
#include "SelNextTexCoordCmd.h"
#include "SelPrevTexCoordCmd.h"
#include "DeselectSurfaceCmd.h"
// Modes
#include "ApplicationBaseMode.h"
@ -132,6 +133,7 @@ class Application {
// TODO: Add moveVertex.
// Make it so that other parts of the application react to the change.
void undo();
void deselect();
void setPreset(unsigned int i);
void setNextPreset();

4
src/ofxPiMapper.cpp

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

1
src/ofxPiMapper.h

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

Loading…
Cancel
Save