aboutsummaryrefslogtreecommitdiff
path: root/game/preview/PreviewStartRecSubScript.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2025-01-10 14:17:38 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2025-01-10 14:17:38 +0100
commit52c838538d2271134a2c5a128074ea9c2ed1d4a3 (patch)
treefd85a4193f88ec48c77d6fbfd90e909ac3a5855c /game/preview/PreviewStartRecSubScript.cpp
parent15a958a7f327bb2e81e7d445f1499ec78c7f5839 (diff)
parentbb2db93bfb8dd7e080d2708548eae660e6b33913 (diff)
Merge branch 'master' into niels/game
Diffstat (limited to 'game/preview/PreviewStartRecSubScript.cpp')
-rw-r--r--game/preview/PreviewStartRecSubScript.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/game/preview/PreviewStartRecSubScript.cpp b/game/preview/PreviewStartRecSubScript.cpp
new file mode 100644
index 0000000..194f849
--- /dev/null
+++ b/game/preview/PreviewStartRecSubScript.cpp
@@ -0,0 +1,21 @@
+#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;
+}