diff options
author | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-08 09:03:30 +0100 |
---|---|---|
committer | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-08 09:03:30 +0100 |
commit | 93aa94921e027e05d7cb9908305af225c64b1ff2 (patch) | |
tree | 8beacc3b049a7150aa2cb5af501b158d11158a9e /game/menus/IButtonScript.cpp | |
parent | 1a61140ab5be8ede0aa19644cd29fb6770261f91 (diff) |
Make format
Diffstat (limited to 'game/menus/IButtonScript.cpp')
-rw-r--r-- | game/menus/IButtonScript.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/game/menus/IButtonScript.cpp b/game/menus/IButtonScript.cpp index da535ca..34efbd0 100644 --- a/game/menus/IButtonScript.cpp +++ b/game/menus/IButtonScript.cpp @@ -2,30 +2,31 @@ #include "system/InputSystem.h" -#include <crepe/types.h> #include <crepe/api/Sprite.h> +#include <crepe/types.h> using namespace crepe; using namespace std; -void IButtonScript::init(){ - this->subscribe<ButtonExitEvent>([this](const ButtonExitEvent& e) { return this->on_button_exit(e); }); - this->subscribe<ButtonEnterEvent>([this](const ButtonEnterEvent& e) { return this->on_button_enter(e); }); +void IButtonScript::init() { + this->subscribe<ButtonExitEvent>([this](const ButtonExitEvent & e) { + return this->on_button_exit(e); + }); + this->subscribe<ButtonEnterEvent>([this](const ButtonEnterEvent & e) { + return this->on_button_enter(e); + }); } -bool IButtonScript::on_button_exit(const ButtonExitEvent& e){ +bool IButtonScript::on_button_exit(const ButtonExitEvent & e) { RefVector<Sprite> sprites = this->get_components<Sprite>(); - for(Sprite & sprite : sprites) - { - sprite.data.color = Color{255,255,255,255}; + for (Sprite & sprite : sprites) { + sprite.data.color = Color {255, 255, 255, 255}; } return false; } -bool IButtonScript::on_button_enter(const ButtonEnterEvent& e){ +bool IButtonScript::on_button_enter(const ButtonEnterEvent & e) { RefVector<Sprite> sprites = this->get_components<Sprite>(); - for(Sprite & sprite : sprites) - { - sprite.data.color = Color{200,200,200,255}; + for (Sprite & sprite : sprites) { + sprite.data.color = Color {200, 200, 200, 255}; } return false; } - |