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
+2 -2
View File
@@ -386,9 +386,9 @@ void Hud::update(bool visible) {
hotbarView->setVisible(visible);
if (!gui->isFocusCaught() && !pause) {
for (int i = keycode::NUM_1; i <= keycode::NUM_9; i++) {
for (int i = static_cast<int>(keycode::NUM_1); i <= static_cast<int>(keycode::NUM_9); i++) {
if (Events::jpressed(i)) {
player->setChosenSlot(i - keycode::NUM_1);
player->setChosenSlot(i - static_cast<int>(keycode::NUM_1));
}
}
if (Events::jpressed(keycode::NUM_0)) {