Big code changes

This commit is contained in:
2026-08-23 20:46:09 -07:00
parent 7243e13df5
commit 0cb0628101
25 changed files with 1645 additions and 227 deletions
+6 -9
View File
@@ -1,9 +1,9 @@
#include "window.hpp"
#include "key_event.hpp"
#include "util/logger.hpp"
#include <sophia/key_event.hpp>
#include <sophia/util/logger.hpp>
namespace hep {
namespace sophia {
Window::Window(int width, int height, const std::string& name)
: width{width}, height{height}, name{name} {
@@ -28,11 +28,8 @@ void Window::createSurface(const vk::Instance& instance,
log::trace("Created vk::SurfaceKHR.");
}
void Window::keyEventCallback(GLFWwindow* window,
int key,
int scancode,
int action,
int mods) {
void Window::keyEventCallback(GLFWwindow* window, int key, int scancode,
int action, int mods) {
if (action == GLFW_PRESS) {
KeyPressedEvent event{static_cast<KeyCode>(key)};
EventSystem::get().dispatch(event);
@@ -61,4 +58,4 @@ void Window::initialize() {
glfwSetKeyCallback(this->window, keyEventCallback);
}
} // namespace hep
} // namespace sophia