aboutsummaryrefslogtreecommitdiff
path: root/game/preview/PreviewReplaySubScript.h
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/PreviewReplaySubScript.h
parentef3f5b0845ba127c0bfcda8c2fce37013fef3878 (diff)
replay in preview scene
Diffstat (limited to 'game/preview/PreviewReplaySubScript.h')
-rw-r--r--game/preview/PreviewReplaySubScript.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/game/preview/PreviewReplaySubScript.h b/game/preview/PreviewReplaySubScript.h
new file mode 100644
index 0000000..ca5bd08
--- /dev/null
+++ b/game/preview/PreviewReplaySubScript.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include "menus/IButtonScript.h"
+
+#include <crepe/api/Script.h>
+
+struct StartPreviewRecording : public crepe::Event {};
+struct StopPreviewRecording : public crepe::Event {};
+
+class PreviewReplaySubScript : public IButtonScript {
+public:
+ void init() override;
+ bool on_button_press(const crepe::ButtonPressEvent & e);
+
+private:
+ crepe::recording_t recording = 0;
+ bool start_recording();
+ bool stop_recording();
+ bool delete_recording();
+private:
+ bool record_saved = false;
+ bool record_started = false;
+};