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