From c8c32f417e2e1b7df10598fa1a84643191ed31ad Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Tue, 10 Jan 2017 18:50:01 +0100 Subject: [PATCH] Add ofxPiMapper::toggleInfo --- src/Application/Application.cpp | 6 +++++- src/Application/Application.h | 6 ++++-- src/ofxPiMapper.cpp | 4 ++++ src/ofxPiMapper.h | 3 +++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Application/Application.cpp b/src/Application/Application.cpp index aa00b76..b9ee621 100644 --- a/src/Application/Application.cpp +++ b/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()); diff --git a/src/Application/Application.h b/src/Application/Application.h index 482b0da..fae310a 100644 --- a/src/Application/Application.h +++ b/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; } diff --git a/src/ofxPiMapper.cpp b/src/ofxPiMapper.cpp index 550f566..15513e8 100644 --- a/src/ofxPiMapper.cpp +++ b/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(); diff --git a/src/ofxPiMapper.h b/src/ofxPiMapper.h index b48f0e8..107feba 100644 --- a/src/ofxPiMapper.h +++ b/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();