mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
refactor input.h and related
This commit is contained in:
parent
9c31c6c8b7
commit
8bb1045e34
12 changed files with 236 additions and 254 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue