diff --git a/src/Application/ProjectionMappingState.cpp b/src/Application/ProjectionMappingState.cpp index 3a39048..ef49fe8 100644 --- a/src/Application/ProjectionMappingState.cpp +++ b/src/Application/ProjectionMappingState.cpp @@ -241,6 +241,34 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar } break; + case '0': // Move selected surface up the layer stack + if(app->getSurfaceManager()->getSelectedSurface() != 0){ + if(app->getSurfaceManager()->getSelectedSurface() == + SurfaceStack::instance()->at(SurfaceStack::instance()->size() - 1)){ + return; + } + + app->getCmdManager()->exec( + new MvLayerUpCmd( + app->getSurfaceManager()->getSelectedSurface()) + ); + } + break; + + case '9': // Move selected surface down the layer stack + if(app->getSurfaceManager()->getSelectedSurface() != 0){ + if(app->getSurfaceManager()->getSelectedSurface() == + SurfaceStack::instance()->at(0)){ + return; + } + + app->getCmdManager()->exec( + new MvLayerDnCmd( + app->getSurfaceManager()->getSelectedSurface()) + ); + } + break; + default: break; } diff --git a/src/Application/ProjectionMappingState.h b/src/Application/ProjectionMappingState.h index 8c0e840..c01ac74 100644 --- a/src/Application/ProjectionMappingState.h +++ b/src/Application/ProjectionMappingState.h @@ -23,6 +23,8 @@ #include "SetNextSourceCmd.h" #include "DuplicateSurfaceCmd.h" #include "ToggleAnimatedSourceCmd.h" +#include "MvLayerUpCmd.h" +#include "MvLayerDnCmd.h" #include "SurfaceType.h" #include "Gui.h"