mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
shift + click for quickmove
This commit is contained in:
parent
1444581cb6
commit
672d5cb152
|
|
@ -829,6 +829,7 @@ enum EControllerActions
|
||||||
ACTION_MENU_OTHER_STICK_LEFT,
|
ACTION_MENU_OTHER_STICK_LEFT,
|
||||||
ACTION_MENU_OTHER_STICK_RIGHT,
|
ACTION_MENU_OTHER_STICK_RIGHT,
|
||||||
ACTION_MENU_PAUSEMENU,
|
ACTION_MENU_PAUSEMENU,
|
||||||
|
ACTION_MENU_QUICK_MOVE,
|
||||||
|
|
||||||
#ifdef _DURANGO
|
#ifdef _DURANGO
|
||||||
ACTION_MENU_GTC_PAUSE,
|
ACTION_MENU_GTC_PAUSE,
|
||||||
|
|
|
||||||
|
|
@ -1304,42 +1304,60 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int buttonNum=0; // 0 = LeftMouse, 1 = RightMouse
|
int buttonNum=0; // 0 = LeftMouse, 1 = RightMouse
|
||||||
BOOL quickKeyHeld=FALSE; // Represents shift key on PC
|
BOOL quickKeyHeld=false; // Represents shift key on PC
|
||||||
|
BOOL quickKeyDown = false; // Represents shift key on PC
|
||||||
BOOL validKeyPress = FALSE;
|
BOOL validKeyPress = false;
|
||||||
bool itemEditorKeyPress = false;
|
bool itemEditorKeyPress = false;
|
||||||
|
|
||||||
// Ignore input from other players
|
// Ignore input from other players
|
||||||
//if(pMinecraft->player->GetXboxPad()!=pInputData->UserIndex) return S_OK;
|
//if(pMinecraft->player->GetXboxPad()!=pInputData->UserIndex) return S_OK;
|
||||||
|
|
||||||
switch(iAction)
|
switch(iAction)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG_MENUS_ENABLED
|
#ifdef _DEBUG_MENUS_ENABLED
|
||||||
case ACTION_MENU_OTHER_STICK_PRESS:
|
case ACTION_MENU_OTHER_STICK_PRESS:
|
||||||
itemEditorKeyPress = TRUE;
|
itemEditorKeyPress = TRUE;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case ACTION_MENU_A:
|
case ACTION_MENU_A:
|
||||||
#ifdef __ORBIS__
|
#ifdef __ORBIS__
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
case ACTION_MENU_TOUCHPAD_PRESS:
|
||||||
#endif
|
#endif
|
||||||
if(!bRepeat)
|
if (!bRepeat)
|
||||||
{
|
{
|
||||||
validKeyPress = TRUE;
|
validKeyPress = TRUE;
|
||||||
|
|
||||||
// Standard left click
|
// Standard left click
|
||||||
buttonNum = 0;
|
buttonNum = 0;
|
||||||
quickKeyHeld = FALSE;
|
if (KMInput.IsKeyDown(VK_SHIFT))
|
||||||
|
|
||||||
if( IsSectionSlotList( m_eCurrSection ) )
|
|
||||||
{
|
{
|
||||||
int currentIndex = getCurrentIndex( m_eCurrSection ) - getSectionStartOffset(m_eCurrSection);
|
{
|
||||||
|
validKeyPress = TRUE;
|
||||||
|
|
||||||
bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex);
|
// Shift and left click
|
||||||
if ( bSlotHasItem )
|
buttonNum = 0;
|
||||||
ui.PlayUISFX(eSFX_Press);
|
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;
|
break;
|
||||||
case ACTION_MENU_X:
|
case ACTION_MENU_X:
|
||||||
|
|
@ -1361,6 +1379,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACTION_MENU_Y:
|
case ACTION_MENU_Y:
|
||||||
if(!bRepeat)
|
if(!bRepeat)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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_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_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_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;
|
pressed = pressed || kbPressed;
|
||||||
released = released || kbReleased;
|
released = released || kbReleased;
|
||||||
|
|
|
||||||
|
|
@ -1532,7 +1532,7 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
|
@ -1756,7 +1756,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
|
@ -1892,7 +1892,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<Optimization>Full</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
|
@ -2742,7 +2742,7 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
|
||||||
<Optimization>Full</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
|
@ -2862,7 +2862,7 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
|
||||||
<Optimization>Full</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
|
@ -2982,7 +2982,7 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
|
||||||
<Optimization>Full</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
|
@ -3102,7 +3102,7 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
|
||||||
<Optimization>Full</Optimization>
|
<Optimization>Full</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue