aboutsummaryrefslogtreecommitdiff
path: root/game/menus/IButtonScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/menus/IButtonScript.cpp')
-rw-r--r--game/menus/IButtonScript.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/game/menus/IButtonScript.cpp b/game/menus/IButtonScript.cpp
index ab907c4..da535ca 100644
--- a/game/menus/IButtonScript.cpp
+++ b/game/menus/IButtonScript.cpp
@@ -1,13 +1,14 @@
#include "IButtonScript.h"
-#include "api/Sprite.h"
-#include "iostream"
+
#include "system/InputSystem.h"
-#include "types.h"
+
+#include <crepe/types.h>
+#include <crepe/api/Sprite.h>
+
using namespace crepe;
using namespace std;
void IButtonScript::init(){
- cout << "script init" << endl;
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); });
}
@@ -17,8 +18,6 @@ bool IButtonScript::on_button_exit(const ButtonExitEvent& e){
{
sprite.data.color = Color{255,255,255,255};
}
-
- cout << "button triggered:" << e.metadata.game_object_id << std::endl;
return false;
}
bool IButtonScript::on_button_enter(const ButtonEnterEvent& e){
@@ -27,7 +26,6 @@ bool IButtonScript::on_button_enter(const ButtonEnterEvent& e){
{
sprite.data.color = Color{200,200,200,255};
}
- cout << "button Enter:" << e.metadata.game_object_id << std::endl;
return false;
}