diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-08 16:17:39 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-08 16:17:39 +0100 |
commit | 424da5eb1500d90389d939cd0b3e6e75d729578d (patch) | |
tree | 991094effc4a5261e5d2ab0771fdd38e95eca94f /game/menus/ButtonReplaySubScript.cpp | |
parent | e2f9c0bcaf22aa73689305faca70f2ec4682f55c (diff) |
delete replay
Diffstat (limited to 'game/menus/ButtonReplaySubScript.cpp')
-rw-r--r-- | game/menus/ButtonReplaySubScript.cpp | 8 |
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; +} |