Big code changes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user