aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/InputSystem.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-09 13:46:45 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-09 13:46:45 +0100
commit87c41870e7e66308ee0c74270e1f91f4943bd733 (patch)
tree244184f92420a77da2d6d7176d65fcca2efe60e7 /src/crepe/system/InputSystem.cpp
parente3318b7e0e075567a6a9e29239e074f4e02fc595 (diff)
testing window events
Diffstat (limited to 'src/crepe/system/InputSystem.cpp')
-rw-r--r--src/crepe/system/InputSystem.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp
index c3bf4d4..7c33308 100644
--- a/src/crepe/system/InputSystem.cpp
+++ b/src/crepe/system/InputSystem.cpp
@@ -1,3 +1,6 @@
+
+#include <iostream>
+
#include "../api/Button.h"
#include "../manager/ComponentManager.h"
#include "../manager/EventManager.h"
@@ -34,6 +37,7 @@ void InputSystem::update() {
- (current_cam.viewport_size.x / 2);
for (const SDLContext::EventData & event : event_list) {
+ std::cout << "event type: " << event.event_type << std::endl;
// Only calculate mouse coordinates for relevant events
if (event.event_type == SDLContext::EventType::MOUSEDOWN
|| event.event_type == SDLContext::EventType::MOUSEUP
@@ -102,6 +106,7 @@ void InputSystem::update() {
break;
}
} else {
+ std::cout << "non mouse event" << std::endl;
// Handle non-mouse events
switch (event.event_type) {
case SDLContext::EventType::KEYDOWN:
@@ -117,7 +122,8 @@ void InputSystem::update() {
event_mgr.queue_event<WindowExposeEvent>({});
break;
case SDLContext::EventType::WINDOW_RESIZE:
- event_mgr.queue_event<WindowResizeEvent>({.dimensions = event.window_data.resize_dimension});
+ std::cout << "input system queue" << std::endl;
+ event_mgr.queue_event<WindowResizeEvent>(WindowResizeEvent{.dimensions = event.window_data.resize_dimension});
break;
case SDLContext::EventType::WINDOW_MOVE:
event_mgr.queue_event<WindowMoveEvent>({.delta_move = event.window_data.move_delta});