Browse Source

Add ofxPiMapper::selectSurface

master
Krisjanis Rijnieks 9 years ago
parent
commit
05c7185ba9
  1. 6
      src/ofxPiMapper.cpp
  2. 12
      src/ofxPiMapper.h

6
src/ofxPiMapper.cpp

@ -40,6 +40,12 @@ void ofxPiMapper::eraseActivePreset(){
_application.getSurfaceManager()->eraseActivePreset();
}
void ofxPiMapper::selectSurface(int i){
if(_application.getState() == ofx::piMapper::PresentationMode::instance()){
_application.getSurfaceManager()->selectSurface(i);
}
}
void ofxPiMapper::togglePauseForSurface(unsigned int i){
ofx::piMapper::BaseSource * s =
_application.getSurfaceManager()->getActivePreset()->getSurfaces().at(i)->getSource();

12
src/ofxPiMapper.h

@ -47,21 +47,19 @@ class ofxPiMapper {
ofxPiMapper::Mode getMode();
// Presets
unsigned int getNumPresets();
unsigned int getActivePresetIndex();
void setActivePreset(unsigned int i);
void setNextPreset();
void cloneActivePreset();
void eraseActivePreset();
// Toggle play/pause for a surface in the active preset.
// Surfaces, active preset
unsigned int getNumSurfaces();
void selectSurface(int i);
void togglePauseForSurface(unsigned int i);
bool loadXmlSettings(string fileName);
unsigned int getNumPresets();
unsigned int getActivePresetIndex();
// Get number of surfaces in the active preset.
unsigned int getNumSurfaces();
private:
ofx::piMapper::Application _application;

Loading…
Cancel
Save