diff --git a/src/Commands/SetTexMapDrawModeCmd.cpp b/src/Commands/SetTexMapDrawModeCmd.cpp new file mode 100644 index 0000000..2f1d279 --- /dev/null +++ b/src/Commands/SetTexMapDrawModeCmd.cpp @@ -0,0 +1,24 @@ +#include "SetTexMapDrawModeCmd.h" + +namespace ofx { +namespace piMapper { + +SetTexMapDrawModeCmd::SetTexMapDrawModeCmd(TextureMappingState * s, int m){ + _state = s; + _newMode = m; +} + +void SetTexMapDrawModeCmd::exec(){ + ofLogNotice("SetTexMapDrawModeCmd", "undo"); + _oldMode = 0; // _state->getDrawMode(); + // _state->setDrawMode(_newMode); +} + +void SetTexMapDrawModeCmd::undo(){ + ofLogNotice("SetTexMapDrawModeCmd", "undo"); + // _state->setDrawMode(_oldMode); +} + +} // namespace piMapper +} // namespace ofx + diff --git a/src/Commands/SetTexMapDrawModeCmd.h b/src/Commands/SetTexMapDrawModeCmd.h new file mode 100644 index 0000000..5265962 --- /dev/null +++ b/src/Commands/SetTexMapDrawModeCmd.h @@ -0,0 +1,29 @@ +// SetTexMapDrawMode +// Sets draw mode of the texture mapping state +// Created by Krisjanis Rijnieks 2016-09-16 + +#pragma once + +#include "BaseCmd.h" +#include "TextureMappingState.h" + +namespace ofx { +namespace piMapper { + +class SetTexMapDrawModeCmd : public BaseUndoCmd { + + public: + SetTexMapDrawModeCmd(TextureMappingState * s, int m); + void exec(); + void undo(); + + private: + TextureMappingState * _state; + int _oldMode; + int _newMode; + +}; + +} // namespace piMapper +} // namespace ofx +