Fix: Right-click dropping items on Creative mode inventory

This commit is contained in:
Adem Kurt 2026-03-11 22:07:09 +03:00 committed by GitHub
parent 1036b7368e
commit 9e88dafef1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1029,7 +1029,7 @@ IUIScene_AbstractContainerMenu::ESceneSection IUIScene_CreativeMenu::GetSectionA
bool IUIScene_CreativeMenu::handleValidKeyPress(int iPad, int buttonNum, BOOL quickKeyHeld) bool IUIScene_CreativeMenu::handleValidKeyPress(int iPad, int buttonNum, BOOL quickKeyHeld)
{ {
// 4J Added - Make pressing the X button clear the hotbar // 4J Added - Make pressing the X button clear the hotbar
if(buttonNum == 1) if(buttonNum == 1 && !m_bPointerOutsideMenu) // Don't clear the hotbar if pointer outside the menu, so handleOutsideClicked can drop the item
{ {
Minecraft *pMinecraft = Minecraft::GetInstance(); Minecraft *pMinecraft = Minecraft::GetInstance();
for(unsigned int i = TabSpec::MAX_SIZE; i < TabSpec::MAX_SIZE + 9; ++i) for(unsigned int i = TabSpec::MAX_SIZE; i < TabSpec::MAX_SIZE + 9; ++i)