2 changed files with 51 additions and 0 deletions
@ -0,0 +1,22 @@ |
|||
#include "ToggleAnimatedSourceCmd.h" |
|||
|
|||
namespace ofx { |
|||
namespace piMapper { |
|||
|
|||
ToggleAnimatedSourceCmd::ToggleAnimatedSourceCmd(BaseSurface * surface){ |
|||
_surface = surface; |
|||
} |
|||
|
|||
void ToggleAnimatedSourceCmd::exec(){ |
|||
ofLogNotice("ToggleAnimatedSourceCmd", "exec"); |
|||
_surface->getSource()->togglePause(); |
|||
} |
|||
|
|||
void ToggleAnimatedSourceCmd::undo(){ |
|||
ofLogNotice("ToggleAnimatedSourceCmd", "undo"); |
|||
_surface->getSource()->togglePause(); |
|||
} |
|||
|
|||
} // namespace piMapper
|
|||
} // namespace ofx
|
|||
|
@ -0,0 +1,29 @@ |
|||
// ToggleAnimatedSourceCmd
|
|||
// Toggles playing of animated (video, gif) sources
|
|||
// Created by Krisjanis Rijnieks 2016-06-10
|
|||
|
|||
#pragma once |
|||
|
|||
#include "BaseCmd.h" |
|||
#include "BaseSurface.h" |
|||
#include "SourceType.h" |
|||
#include "VideoSource.h" |
|||
|
|||
namespace ofx { |
|||
namespace piMapper { |
|||
|
|||
class ToggleAnimatedSourceCmd : public BaseUndoCmd { |
|||
|
|||
public: |
|||
ToggleAnimatedSourceCmd(BaseSurface * surface); |
|||
void exec(); |
|||
void undo(); |
|||
|
|||
private: |
|||
BaseSurface * _surface; |
|||
|
|||
}; |
|||
|
|||
} // namespace piMapper
|
|||
} // namespace ofx
|
|||
|
Loading…
Reference in new issue