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