From 93aa94921e027e05d7cb9908305af225c64b1ff2 Mon Sep 17 00:00:00 2001 From: Max-001 Date: Wed, 8 Jan 2025 09:03:30 +0100 Subject: Make format --- game/menus/IButtonScript.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'game/menus/IButtonScript.cpp') 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 #include +#include using namespace crepe; using namespace std; -void IButtonScript::init(){ - this->subscribe([this](const ButtonExitEvent& e) { return this->on_button_exit(e); }); - this->subscribe([this](const ButtonEnterEvent& e) { return this->on_button_enter(e); }); +void IButtonScript::init() { + this->subscribe([this](const ButtonExitEvent & e) { + return this->on_button_exit(e); + }); + this->subscribe([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 sprites = this->get_components(); - 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 sprites = this->get_components(); - 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; } - -- cgit v1.2.3