From 4cabfd30acb8c809fb60802571cf1efd58e41da8 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sun, 5 Nov 2023 00:19:04 -0400 Subject: [PATCH] Fix Selecting "..." Slot With Keyboard --- source/client/app/Minecraft.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/client/app/Minecraft.cpp b/source/client/app/Minecraft.cpp index 3184af1..f89ddf7 100644 --- a/source/client/app/Minecraft.cpp +++ b/source/client/app/Minecraft.cpp @@ -433,9 +433,7 @@ void Minecraft::tickInput() { int slot = m_pLocalPlayer->m_pInventory->m_SelectedHotbarSlot; - int maxItems = m_gui.getNumSlots() - 1; - if (isTouchscreen()) - maxItems--; + int maxItems = m_gui.getNumUsableSlots() - 1; if (Mouse::getEventButtonState() == 0) // @NOTE: Scroll up { @@ -469,7 +467,7 @@ void Minecraft::tickInput() { m_gui.handleKeyPressed(keyCode); - for (int i = 0; i < m_gui.getNumSlots(); i++) + for (int i = 0; i < m_gui.getNumUsableSlots(); i++) { if (getOptions()->isKey(eKeyMappingIndex(KM_SLOT_1 + i), keyCode)) m_pLocalPlayer->m_pInventory->selectSlot(i);