aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-25 10:38:18 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-25 10:38:18 +0100
commit327154fd428e0798eea544d9f073f8e1293aa158 (patch)
tree0bf5ea14a33cf54ab6bbddd22bce5e72f9398cb0 /src/crepe/api
parent987fc16a8ae124548e2074d6f46806387c03e161 (diff)
most test working
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/Button.h3
-rw-r--r--src/crepe/api/EventManager.hpp2
-rw-r--r--src/crepe/api/UiObject.h4
3 files changed, 6 insertions, 3 deletions
diff --git a/src/crepe/api/Button.h b/src/crepe/api/Button.h
index 9b1341f..709854a 100644
--- a/src/crepe/api/Button.h
+++ b/src/crepe/api/Button.h
@@ -1,3 +1,4 @@
+#pragma once
#include <functional>
#include "Component.h"
@@ -6,7 +7,7 @@
namespace crepe {
class Button : public UiObject{
public:
- Button();
+ Button(game_object_id_t id) : UiObject(id){};
bool interactable = true;
bool is_toggle = false;
bool is_pressed = false;
diff --git a/src/crepe/api/EventManager.hpp b/src/crepe/api/EventManager.hpp
index a5f4556..3eae90a 100644
--- a/src/crepe/api/EventManager.hpp
+++ b/src/crepe/api/EventManager.hpp
@@ -1,5 +1,5 @@
#pragma once
-
+#include <iostream>
#include "EventManager.h"
namespace crepe {
diff --git a/src/crepe/api/UiObject.h b/src/crepe/api/UiObject.h
index 1d7be69..82140a0 100644
--- a/src/crepe/api/UiObject.h
+++ b/src/crepe/api/UiObject.h
@@ -4,12 +4,14 @@
#include "api/EventHandler.h"
namespace crepe {
+
class UiObject : public Component{
public:
- UiObject();
+ UiObject(game_object_id_t id) : Component(id){};
int width = 0;
int height = 0;
public:
virtual int get_instances_max() const { return 1; }
};
+
}