diff options
Diffstat (limited to 'game/preview/PreviewStopRecSubScript.cpp')
-rw-r--r-- | game/preview/PreviewStopRecSubScript.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/game/preview/PreviewStopRecSubScript.cpp b/game/preview/PreviewStopRecSubScript.cpp new file mode 100644 index 0000000..c674a8b --- /dev/null +++ b/game/preview/PreviewStopRecSubScript.cpp @@ -0,0 +1,21 @@ +#include "PreviewStopRecSubScript.h" +#include "PreviewReplaySubScript.h" + +#include <crepe/api/AudioSource.h> +#include <crepe/types.h> + +using namespace crepe; +using namespace std; + +void PreviewStopRecSubScript::init() { + IButtonScript::init(); + this->subscribe<ButtonPressEvent>([this](const ButtonPressEvent & e) { + return this->on_button_press(e); + }); + +} + +bool PreviewStopRecSubScript::on_button_press(const ButtonPressEvent & e) { + this->trigger_event<StopPreviewRecording>(); + return false; +} |