aboutsummaryrefslogtreecommitdiff
path: root/game/preview/PreviewReplaySubScript.h
blob: ca5bd08943294208a68b856f552f1fa9e630bfb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
};