diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-10 14:50:50 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-10 14:50:50 +0100 |
commit | 7aa07561a52016007ff852acefa4db68260f0f1e (patch) | |
tree | ac438e906e581ee68f9d065dea90a2cbb8436d15 /game/preview/PreviewStartRecSubScript.cpp | |
parent | d7c8cc30e1d37526cf142f950038500b96760514 (diff) | |
parent | 0f8bf257d86b5532f3d6f559e5368668c255af7c (diff) |
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/game-improvements
Diffstat (limited to 'game/preview/PreviewStartRecSubScript.cpp')
-rw-r--r-- | game/preview/PreviewStartRecSubScript.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/game/preview/PreviewStartRecSubScript.cpp b/game/preview/PreviewStartRecSubScript.cpp new file mode 100644 index 0000000..8a2f54c --- /dev/null +++ b/game/preview/PreviewStartRecSubScript.cpp @@ -0,0 +1,20 @@ +#include "PreviewStartRecSubScript.h" +#include "PreviewReplaySubScript.h" + +#include <crepe/api/AudioSource.h> +#include <crepe/types.h> + +using namespace crepe; +using namespace std; + +void PreviewStartRecSubScript::init() { + IButtonScript::init(); + this->subscribe<ButtonPressEvent>([this](const ButtonPressEvent & e) { + return this->on_button_press(e); + }); +} + +bool PreviewStartRecSubScript::on_button_press(const ButtonPressEvent & e) { + this->trigger_event<StartPreviewRecording>(); + return false; +} |