Browse Source

Add shortcuts for `ScaleSurface*` commands

master
Krisjanis Rijnieks 9 years ago
parent
commit
8ddfe2b243
  1. 16
      src/Application/ProjectionMappingState.cpp
  2. 2
      src/Application/ProjectionMappingState.h

16
src/Application/ProjectionMappingState.cpp

@ -272,6 +272,22 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar
}
break;
case '+': // Scale surface up
if(app->getSurfaceManager()->getSelectedSurface() != 0){
app->getCmdManager()->exec(
new ScaleSurfaceUpCmd(
app->getSurfaceManager()->getSelectedSurface(), 0.1f));
}
break;
case '-': // Scale surface down
if(app->getSurfaceManager()->getSelectedSurface() != 0){
app->getCmdManager()->exec(
new ScaleSurfaceDnCmd(
app->getSurfaceManager()->getSelectedSurface(), 0.1f));
}
break;
default:
break;
}

2
src/Application/ProjectionMappingState.h

@ -25,6 +25,8 @@
#include "ToggleAnimatedSourceCmd.h"
#include "MvLayerUpCmd.h"
#include "MvLayerDnCmd.h"
#include "ScaleSurfaceUpCmd.h"
#include "ScaleSurfaceDnCmd.h"
#include "SurfaceType.h"
#include "Gui.h"

Loading…
Cancel
Save