2 changed files with 52 additions and 0 deletions
@ -0,0 +1,23 @@ |
|||
#include "SelNextSurfaceCmd.h" |
|||
|
|||
namespace ofx { |
|||
namespace piMapper { |
|||
|
|||
SelNextSurfaceCmd::SelNextSurfaceCmd(SurfaceManager * surfaceManager){ |
|||
_surfaceManager = surfaceManager; |
|||
} |
|||
|
|||
void SelNextSurfaceCmd::exec(){ |
|||
_prevSelectedSurface = _surfaceManager->getSelectedSurface(); |
|||
_surfaceManager->selectNextSurface(); |
|||
} |
|||
|
|||
void SelNextSurfaceCmd::undo(){ |
|||
ofLogNotice("SelNextSurfaceCmd", "undo"); |
|||
_surfaceManager->selectSurface(_prevSelectedSurface); |
|||
_prevSelectedSurface = 0; |
|||
} |
|||
|
|||
} // namespace piMapper
|
|||
} // namespace ofx
|
|||
|
@ -0,0 +1,29 @@ |
|||
// SelNextSurfaceCmd
|
|||
// Selects next surface in the projection mapping mode
|
|||
// Created by Krisjanis Rijnieks 2016-02-03
|
|||
|
|||
#pragma once |
|||
|
|||
#include "BaseCmd.h" |
|||
#include "BaseSurface.h" |
|||
#include "SurfaceManager.h" |
|||
|
|||
namespace ofx { |
|||
namespace piMapper { |
|||
|
|||
class SelNextSurfaceCmd : public BaseUndoCmd { |
|||
|
|||
public: |
|||
SelNextSurfaceCmd(SurfaceManager * surfaceManager); |
|||
void exec(); |
|||
void undo(); |
|||
|
|||
private: |
|||
SurfaceManager * _surfaceManager; |
|||
BaseSurface * _prevSelectedSurface; |
|||
|
|||
}; |
|||
|
|||
} // namespace piMapper
|
|||
} // namespace ofx
|
|||
|
Loading…
Reference in new issue