aboutsummaryrefslogtreecommitdiff
path: root/game/preview/PreviewStartRecSubScript.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-08 19:47:31 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-08 19:47:31 +0100
commit30974f588816aa03652002111c6a946b138e3bc5 (patch)
tree247b7f5b01c3a9ffad7f2c6ef7ac2c30109f3f8f /game/preview/PreviewStartRecSubScript.cpp
parentef3f5b0845ba127c0bfcda8c2fce37013fef3878 (diff)
replay in preview scene
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;
+}