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/PreviewStartRecSubScript.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 game/preview/PreviewStartRecSubScript.cpp (limited to 'game/preview/PreviewStartRecSubScript.cpp') diff --git a/game/preview/PreviewStartRecSubScript.cpp b/game/preview/PreviewStartRecSubScript.cpp new file mode 100644 index 0000000..194f849 --- /dev/null +++ b/game/preview/PreviewStartRecSubScript.cpp @@ -0,0 +1,21 @@ +#include "PreviewStartRecSubScript.h" +#include "PreviewReplaySubScript.h" + +#include +#include + +using namespace crepe; +using namespace std; + +void PreviewStartRecSubScript::init() { + IButtonScript::init(); + this->subscribe([this](const ButtonPressEvent & e) { + return this->on_button_press(e); + }); + +} + +bool PreviewStartRecSubScript::on_button_press(const ButtonPressEvent & e) { + this->trigger_event(); + return false; +} -- cgit v1.2.3