Browse Source

Add ofxPiMapper::toggleInfo

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

6
src/Application/Application.cpp

@ -129,7 +129,7 @@ void Application::onKeyPressed(ofKeyEventArgs & args){
break;
case 'i':
_info.toggle();
toggleInfo();
break;
case 's':
@ -195,6 +195,10 @@ void Application::addFboSource(FboSource * fboSource){
_mediaServer.addFboSource(fboSource);
}
void Application::toggleInfo(){
_info.toggle();
}
void Application::saveProject(){
ofLogNotice("Application::saveProject", "Saving project...");
_surfaceManager.saveXmlSettings(SettingsLoader::instance()->getLastLoadedFilename());

6
src/Application/Application.h

@ -58,11 +58,13 @@ class Application : public KeyListener {
void addFboSource(FboSource & fboSource);
void addFboSource(FboSource * fboSource);
void toggleInfo();
void saveProject();
bool loadXmlSettings(string fileName);
bool isShiftKeyDown();
SurfaceManager * getSurfaceManager(){ return &_surfaceManager; }
CmdManager * getCmdManager(){ return &_cmdManager; }
MediaServer * getMediaServer(){ return &_mediaServer; }

4
src/ofxPiMapper.cpp

@ -92,6 +92,10 @@ unsigned int ofxPiMapper::getNumSurfaces(){
return _application.getSurfaceManager()->getActivePreset()->getSurfaces().size();
}
void ofxPiMapper::toggleInfo(){
_application.toggleInfo();
}
void ofxPiMapper::setMode(ofxPiMapper::Mode m){
if(m == PRESENTATION_MODE){
_application.setPresentationMode();

3
src/ofxPiMapper.h

@ -42,6 +42,9 @@ class ofxPiMapper {
void registerFboSource(ofx::piMapper::FboSource & fboSource);
void registerFboSource(ofx::piMapper::FboSource * fboSource);
// Application
void toggleInfo();
// Modes
void setMode(ofxPiMapper::Mode m);
ofxPiMapper::Mode getMode();

Loading…
Cancel
Save