From 3b6081d03300d353434fd4f6e91237fc8f1a4390 Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Wed, 8 Jan 2025 14:40:37 +0100 Subject: added credit window --- game/menus/mainmenu/CreditsSubScript.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'game/menus/mainmenu/CreditsSubScript.cpp') diff --git a/game/menus/mainmenu/CreditsSubScript.cpp b/game/menus/mainmenu/CreditsSubScript.cpp index 5326594..ce74ba4 100644 --- a/game/menus/mainmenu/CreditsSubScript.cpp +++ b/game/menus/mainmenu/CreditsSubScript.cpp @@ -13,9 +13,18 @@ using namespace crepe; + CreditsSubScript::CreditsSubScript(const std::string & tag) { this->tag = tag; } void CreditsSubScript::init() { + IButtonScript::init(); + this->subscribe([this](const ButtonPressEvent & e) { + return this->on_button_press(e); + }); + this->subscribe([this](const ShowCreditsEvent & e) { + this->enable_all(); + return false; + }); this->disable_all(); } @@ -44,3 +53,8 @@ bool CreditsSubScript::enable_all() { } return false; } + +bool CreditsSubScript::on_button_press(const ButtonPressEvent & e) { + return this->disable_all(); +} + -- cgit v1.2.3