From 7d9a11b4b3deb64bc43325e0b6f9f272085a3a33 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Mon, 24 Oct 2016 17:44:35 +0200 Subject: [PATCH] Add ofxPiMapper::selectNext and PrevSurface methods --- src/ofxPiMapper.cpp | 8 ++++++++ src/ofxPiMapper.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/ofxPiMapper.cpp b/src/ofxPiMapper.cpp index 5a0b020..0fb66bd 100644 --- a/src/ofxPiMapper.cpp +++ b/src/ofxPiMapper.cpp @@ -46,6 +46,14 @@ void ofxPiMapper::selectSurface(int i){ } } +void ofxPiMapper::selectNextSurface(){ + _application.getState()->selectNextSurface(&_application); +} + +void ofxPiMapper::selectPrevSurface(){ + _application.getState()->selectPrevSurface(&_application); +} + void ofxPiMapper::togglePauseForSurface(unsigned int i){ ofx::piMapper::BaseSource * s = _application.getSurfaceManager()->getActivePreset()->getSurfaces().at(i)->getSource(); diff --git a/src/ofxPiMapper.h b/src/ofxPiMapper.h index d153a1d..dec0a43 100644 --- a/src/ofxPiMapper.h +++ b/src/ofxPiMapper.h @@ -57,6 +57,8 @@ class ofxPiMapper { // Surfaces, active preset unsigned int getNumSurfaces(); void selectSurface(int i); + void selectNextSurface(); + void selectPrevSurface(); void togglePauseForSurface(unsigned int i); bool loadXmlSettings(string fileName);