Browse Source

Implement `MvLayerUpCmd` and `MvLayerDnCmd` into `ProectionMappingState`

master
Krisjanis Rijnieks 9 years ago
parent
commit
a1f4363403
  1. 28
      src/Application/ProjectionMappingState.cpp
  2. 2
      src/Application/ProjectionMappingState.h

28
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;
}

2
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"

Loading…
Cancel
Save