aboutsummaryrefslogtreecommitdiff
path: root/game/preview/PreviewReplaySubScript.h
diff options
context:
space:
mode:
authorMax-001 <80035972+Max-001@users.noreply.github.com>2025-01-10 14:13:46 +0100
committerGitHub <noreply@github.com>2025-01-10 14:13:46 +0100
commitbb2db93bfb8dd7e080d2708548eae660e6b33913 (patch)
tree32a54bc4469cb894aa009736e070bdc382e48e76 /game/preview/PreviewReplaySubScript.h
parentd20b25828b53af170a6534263e8de114e7fac121 (diff)
parent8d46ad5a20d1aa5b784291ae323e38d1e0d59351 (diff)
Merge pull request #122 from lonkaars/jaro/game
Jaro/game
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;
+};