aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common
diff options
context:
space:
mode:
authorslcyed <91488376+slcyed@users.noreply.github.com>2026-03-03 11:27:23 -0500
committerGitHub <noreply@github.com>2026-03-03 23:27:23 +0700
commit5c91c2608690872aabba4f62d5ceb02c934f5f32 (patch)
treed7c7ce9bf5e63a8b0683d013a0354951246f9a50 /Minecraft.Client/Common
parentb44d29b2ff6742af5223582960518c5ea948748f (diff)
shift + click for quickmove (#278)
* shift + click for quickmove * shift click quick move in inventory
Diffstat (limited to 'Minecraft.Client/Common')
-rw-r--r--Minecraft.Client/Common/App_enums.h1
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp47
-rw-r--r--Minecraft.Client/Common/UI/UIController.cpp1
3 files changed, 35 insertions, 14 deletions
diff --git a/Minecraft.Client/Common/App_enums.h b/Minecraft.Client/Common/App_enums.h
index db7bf70b..e8e0d147 100644
--- a/Minecraft.Client/Common/App_enums.h
+++ b/Minecraft.Client/Common/App_enums.h
@@ -829,6 +829,7 @@ enum EControllerActions
ACTION_MENU_OTHER_STICK_LEFT,
ACTION_MENU_OTHER_STICK_RIGHT,
ACTION_MENU_PAUSEMENU,
+ ACTION_MENU_QUICK_MOVE,
#ifdef _DURANGO
ACTION_MENU_GTC_PAUSE,
diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp
index 1b76141d..667431b2 100644
--- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp
@@ -1304,42 +1304,60 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b
#endif
int buttonNum=0; // 0 = LeftMouse, 1 = RightMouse
- BOOL quickKeyHeld=FALSE; // Represents shift key on PC
-
- BOOL validKeyPress = FALSE;
+ BOOL quickKeyHeld=false; // Represents shift key on PC
+ BOOL quickKeyDown = false; // Represents shift key on PC
+ BOOL validKeyPress = false;
bool itemEditorKeyPress = false;
// Ignore input from other players
//if(pMinecraft->player->GetXboxPad()!=pInputData->UserIndex) return S_OK;
-
+
switch(iAction)
{
#ifdef _DEBUG_MENUS_ENABLED
case ACTION_MENU_OTHER_STICK_PRESS:
itemEditorKeyPress = TRUE;
break;
-#endif
+#endif
case ACTION_MENU_A:
#ifdef __ORBIS__
case ACTION_MENU_TOUCHPAD_PRESS:
#endif
- if(!bRepeat)
+ if (!bRepeat)
{
validKeyPress = TRUE;
// Standard left click
buttonNum = 0;
- quickKeyHeld = FALSE;
-
- if( IsSectionSlotList( m_eCurrSection ) )
+ if (KMInput.IsKeyDown(VK_SHIFT))
{
- int currentIndex = getCurrentIndex( m_eCurrSection ) - getSectionStartOffset(m_eCurrSection);
+ {
+ validKeyPress = TRUE;
- bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex);
- if ( bSlotHasItem )
- ui.PlayUISFX(eSFX_Press);
+ // Shift and left click
+ buttonNum = 0;
+ quickKeyHeld = TRUE;
+ if (IsSectionSlotList(m_eCurrSection))
+ {
+ int currentIndex = getCurrentIndex(m_eCurrSection) - getSectionStartOffset(m_eCurrSection);
+
+ bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex);
+ if (bSlotHasItem)
+ ui.PlayUISFX(eSFX_Press);
+ }
+ }
+ }
+ else {
+ 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_X:
@@ -1361,6 +1379,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b
}
}
break;
+
case ACTION_MENU_Y:
if(!bRepeat)
{
diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp
index 8b38bbb3..9e4a3202 100644
--- a/Minecraft.Client/Common/UI/UIController.cpp
+++ b/Minecraft.Client/Common/UI/UIController.cpp
@@ -1012,6 +1012,7 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
case ACTION_MENU_PAUSEMENU: kbDown = KMInput.IsKeyDown(VK_ESCAPE); kbPressed = KMInput.IsKeyPressed(VK_ESCAPE); kbReleased = KMInput.IsKeyReleased(VK_ESCAPE); break;
case ACTION_MENU_LEFT_SCROLL: kbDown = KMInput.IsKeyDown('Q'); kbPressed = KMInput.IsKeyPressed('Q'); kbReleased = KMInput.IsKeyReleased('Q'); break;
case ACTION_MENU_RIGHT_SCROLL: kbDown = KMInput.IsKeyDown('E'); kbPressed = KMInput.IsKeyPressed('E'); kbReleased = KMInput.IsKeyReleased('E'); break;
+ case ACTION_MENU_QUICK_MOVE: kbDown = KMInput.IsKeyDown(VK_SHIFT); kbPressed = KMInput.IsKeyPressed(VK_SHIFT); kbReleased = KMInput.IsKeyReleased(VK_SHIFT); break;
}
pressed = pressed || kbPressed;
released = released || kbReleased;