5 changed files with 558 additions and 558 deletions
File diff suppressed because it is too large
@ -1,23 +1,23 @@ |
|||
#include "SetActivePresetCmd.h" |
|||
#include "SetPresetCmd.h" |
|||
|
|||
namespace ofx { |
|||
namespace piMapper { |
|||
|
|||
SetActivePresetCmd::SetActivePresetCmd(Application * app, unsigned int pi){ |
|||
SetPresetCmd::SetPresetCmd(Application * app, unsigned int pi){ |
|||
_app = app; |
|||
_newPresetIndex = pi; |
|||
} |
|||
|
|||
void SetActivePresetCmd::exec(){ |
|||
ofLogNotice("SetActivePresetCmd", "exec"); |
|||
void SetPresetCmd::exec(){ |
|||
ofLogNotice("SetPresetCmd", "exec"); |
|||
_prevPresetIndex = _app->getSurfaceManager()->getActivePresetIndex(); |
|||
_app->getSurfaceManager()->deselectSurface(); |
|||
_selectedSurfaceIndex = _app->getSurfaceManager()->getSelectedSurfaceIndex(); |
|||
_app->getSurfaceManager()->setPreset(_newPresetIndex); |
|||
} |
|||
|
|||
void SetActivePresetCmd::undo(){ |
|||
ofLogNotice("SetActivePresetCmd", "undo"); |
|||
void SetPresetCmd::undo(){ |
|||
ofLogNotice("SetPresetCmd", "undo"); |
|||
_app->getSurfaceManager()->setPreset(_prevPresetIndex); |
|||
_app->getSurfaceManager()->selectSurface(_selectedSurfaceIndex); |
|||
} |
Loading…
Reference in new issue