diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-08 14:40:37 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-08 14:40:37 +0100 |
commit | 3b6081d03300d353434fd4f6e91237fc8f1a4390 (patch) | |
tree | 4c7b75f641e36de0c8aea933ea2cbdb213c35f0b /game/menus/mainmenu/CreditsSubScript.cpp | |
parent | aa8bf26452157f81f72b6d6759e461ff2ca24568 (diff) |
added credit window
Diffstat (limited to 'game/menus/mainmenu/CreditsSubScript.cpp')
-rw-r--r-- | game/menus/mainmenu/CreditsSubScript.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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<ButtonPressEvent>([this](const ButtonPressEvent & e) { + return this->on_button_press(e); + }); + this->subscribe<ShowCreditsEvent>([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(); +} + |