From 30974f588816aa03652002111c6a946b138e3bc5 Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Wed, 8 Jan 2025 19:47:31 +0100 Subject: replay in preview scene --- game/preview/PreviewStopRecSubScript.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 game/preview/PreviewStopRecSubScript.cpp (limited to 'game/preview/PreviewStopRecSubScript.cpp') diff --git a/game/preview/PreviewStopRecSubScript.cpp b/game/preview/PreviewStopRecSubScript.cpp new file mode 100644 index 0000000..c674a8b --- /dev/null +++ b/game/preview/PreviewStopRecSubScript.cpp @@ -0,0 +1,21 @@ +#include "PreviewStopRecSubScript.h" +#include "PreviewReplaySubScript.h" + +#include +#include + +using namespace crepe; +using namespace std; + +void PreviewStopRecSubScript::init() { + IButtonScript::init(); + this->subscribe([this](const ButtonPressEvent & e) { + return this->on_button_press(e); + }); + +} + +bool PreviewStopRecSubScript::on_button_press(const ButtonPressEvent & e) { + this->trigger_event(); + return false; +} -- cgit v1.2.3