Refactor project structure

This commit is contained in:
2023-06-09 14:45:44 +02:00
parent ae61cccb70
commit cf7d2ee7bf
39 changed files with 85 additions and 84 deletions

21
src/input/input.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include "input.h"
void Input::handle_keyboard_input(entt::registry &registry, Key const &key_input)
{
registry.ctx().erase<Key>();
registry.ctx().emplace<Key>(key_input);
}
void Input::handle_mouse_button_input(entt::registry &registry,
MouseButton const &mouse_button_input)
{
registry.ctx().erase<MouseButton>();
registry.ctx().emplace<MouseButton>(mouse_button_input);
}
void Input::handle_mouse_cursor_input(entt::registry &registry,
MouseCursor const &mouse_cursor_input)
{
registry.ctx().erase<MouseCursor>();
registry.ctx().emplace<MouseCursor>(mouse_cursor_input);
}