diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-03 02:01:12 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-03 02:01:12 +0700 |
| commit | 84c31a2331f7a0ec85b9d438992e244f60e5020f (patch) | |
| tree | 9e8d50a15b78b43d979642615702fd6e0f02cab9 /Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp | |
| parent | 53443f1d55ef18bc65895f1364a4979d6124973c (diff) | |
Also remove clicking sound effect on empty container UI slots for rclick and middle mouse button click
Tested by me so no PR and just push upstream
Diffstat (limited to 'Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp')
| -rw-r--r-- | Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp index b6d1cc3c..cc1c1b82 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -1323,7 +1323,15 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b // Standard right click buttonNum = 1; quickKeyHeld = FALSE; - ui.PlayUISFX(eSFX_Press); + + if( IsSectionSlotList( m_eCurrSection ) ) + { + int currentIndex = getCurrentIndex( m_eCurrSection ) - getSectionStartOffset(m_eCurrSection); + + bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex); + if ( bSlotHasItem ) + ui.PlayUISFX(eSFX_Press); + } } break; case ACTION_MENU_Y: @@ -1342,7 +1350,14 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b // Shift and left click buttonNum = 0; quickKeyHeld = TRUE; - ui.PlayUISFX(eSFX_Press); + if( IsSectionSlotList( m_eCurrSection ) ) + { + int currentIndex = getCurrentIndex( m_eCurrSection ) - getSectionStartOffset(m_eCurrSection); + + bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex); + if ( bSlotHasItem ) + ui.PlayUISFX(eSFX_Press); + } } } break; |
