mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +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
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue