Browse Source

Integrate `SetNextSourceCmd` into `Application`

master
Krisjanis Rijnieks 9 years ago
parent
commit
19bbb3a06c
  1. 7
      src/Application/ProjectionMappingState.cpp
  2. 1
      src/Application/ProjectionMappingState.h
  3. 8
      src/Application/TextureMappingState.cpp
  4. 1
      src/Application/TextureMappingState.h

7
src/Application/ProjectionMappingState.cpp

@ -173,6 +173,13 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar
app->getCmdManager()->exec(new DeselectSurfaceCmd(app->getSurfaceManager())); app->getCmdManager()->exec(new DeselectSurfaceCmd(app->getSurfaceManager()));
break; break;
case OF_KEY_TAB:
app->getCmdManager()->exec(
new SetNextSourceCmd(
app->getSurfaceManager()->getSelectedSurface(),
app->getGui()->getSourcesEditor()));
break;
default: default:
break; break;
} }

1
src/Application/ProjectionMappingState.h

@ -20,6 +20,7 @@
#include "StartDragSurfaceCmd.h" #include "StartDragSurfaceCmd.h"
#include "TogglePerspectiveCmd.h" #include "TogglePerspectiveCmd.h"
#include "DeselectSurfaceCmd.h" #include "DeselectSurfaceCmd.h"
#include "SetNextSourceCmd.h"
#include "SurfaceType.h" #include "SurfaceType.h"
#include "Gui.h" #include "Gui.h"

8
src/Application/TextureMappingState.cpp

@ -23,6 +23,7 @@ void TextureMappingState::onKeyPressed(Application * app, ofKeyEventArgs & args)
app->getCmdManager()->exec( app->getCmdManager()->exec(
new SelNextTexCoordCmd(app->getGui()->getTextureEditor())); new SelNextTexCoordCmd(app->getGui()->getTextureEditor()));
break; break;
case '<': case '<':
app->getCmdManager()->exec( app->getCmdManager()->exec(
new SelPrevTexCoordCmd(app->getGui()->getTextureEditor())); new SelPrevTexCoordCmd(app->getGui()->getTextureEditor()));
@ -32,6 +33,13 @@ void TextureMappingState::onKeyPressed(Application * app, ofKeyEventArgs & args)
app->getCmdManager()->exec( app->getCmdManager()->exec(
new DeselectTexCoordCmd(app->getGui()->getTextureEditor())); new DeselectTexCoordCmd(app->getGui()->getTextureEditor()));
break; break;
case OF_KEY_TAB:
app->getCmdManager()->exec(
new SetNextSourceCmd(
app->getSurfaceManager()->getSelectedSurface(),
app->getGui()->getSourcesEditor()));
break;
} }
} }

1
src/Application/TextureMappingState.h

@ -7,6 +7,7 @@
#include "SelNextTexCoordCmd.h" #include "SelNextTexCoordCmd.h"
#include "SelPrevTexCoordCmd.h" #include "SelPrevTexCoordCmd.h"
#include "DeselectTexCoordCmd.h" #include "DeselectTexCoordCmd.h"
#include "SetNextSourceCmd.h"
namespace ofx { namespace ofx {
namespace piMapper { namespace piMapper {

Loading…
Cancel
Save