aboutsummaryrefslogtreecommitdiff
path: root/game/menus/ButtonReplaySubScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/menus/ButtonReplaySubScript.cpp')
-rw-r--r--game/menus/ButtonReplaySubScript.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/game/menus/ButtonReplaySubScript.cpp b/game/menus/ButtonReplaySubScript.cpp
index 9308350..ddd9fa4 100644
--- a/game/menus/ButtonReplaySubScript.cpp
+++ b/game/menus/ButtonReplaySubScript.cpp
@@ -16,6 +16,9 @@ void ButtonReplaySubScript::init() {
this->subscribe<EndGameEvent>([this](const EndGameEvent & e) {
return this->set_recording();
});
+ this->subscribe<DeleteRecordingEvent>([this](const DeleteRecordingEvent & e) {
+ return this->delete_recording();
+ });
replay.record_start();
}
@@ -28,3 +31,8 @@ bool ButtonReplaySubScript::set_recording() {
this->recording = replay.record_end();
return false;
}
+
+bool ButtonReplaySubScript::delete_recording() {
+ replay.release(this->recording);
+ return false;
+}