refactor input.h and related

This commit is contained in:
A-lex-Ra
2024-02-23 18:49:15 +06:00
parent 9c31c6c8b7
commit 8bb1045e34
12 changed files with 236 additions and 254 deletions
+4 -4
View File
@@ -71,10 +71,10 @@ void GUI::actMouse(float delta) {
pressed = nullptr;
}
if (hover) {
for (int i = mousecode::BUTTON_1; i < mousecode::BUTTON_1+12; i++) {
if (hover) {//WTF?! FIXME
for (int i = static_cast<int>(mousecode::BUTTON_1); i < static_cast<int>(mousecode::BUTTON_1)+12; i++) {
if (Events::jclicked(i)) {
hover->clicked(this, i);
hover->clicked(this, static_cast<mousecode>(i));
}
}
}
@@ -101,7 +101,7 @@ void GUI::act(float delta) {
focus->typed(codepoint);
}
for (auto key : Events::pressedKeys) {
focus->keyPressed(key);
focus->keyPressed(static_cast<keycode>(key)); // temporary solution
}
if (!Events::_cursor_locked) {