mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-11 11:29:02 +00:00
Merge branch 'dev' into feat/restore-java-gui
This commit is contained in:
@@ -3194,13 +3194,12 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
||||
ui.SetTooltips( iPad, iA,iB,iX,iY,iLT,iRT,iLB,iRB);
|
||||
|
||||
int wheel = 0;
|
||||
if (InputManager.GetValue(iPad, MINECRAFT_ACTION_LEFT_SCROLL, true) > 0 && gameMode->isInputAllowed(MINECRAFT_ACTION_LEFT_SCROLL) )
|
||||
{
|
||||
wheel = 1;
|
||||
}
|
||||
else if (InputManager.GetValue(iPad, MINECRAFT_ACTION_RIGHT_SCROLL,true) > 0 && gameMode->isInputAllowed(MINECRAFT_ACTION_RIGHT_SCROLL) )
|
||||
{
|
||||
wheel = -1;
|
||||
unsigned int leftTicks = InputManager.GetValue(iPad, MINECRAFT_ACTION_LEFT_SCROLL, true);
|
||||
unsigned int rightTicks = InputManager.GetValue(iPad, MINECRAFT_ACTION_RIGHT_SCROLL, true);
|
||||
if (leftTicks > 0 && gameMode->isInputAllowed(MINECRAFT_ACTION_LEFT_SCROLL)) {
|
||||
wheel = (int)leftTicks; // positive = left
|
||||
} else if (rightTicks > 0 && gameMode->isInputAllowed(MINECRAFT_ACTION_RIGHT_SCROLL)) {
|
||||
wheel = -(int)rightTicks; // negative = right
|
||||
}
|
||||
if (wheel != 0)
|
||||
{
|
||||
@@ -3223,7 +3222,6 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
||||
options->flySpeed += wheel * .25f;
|
||||
}
|
||||
}
|
||||
|
||||
if( gameMode->isInputAllowed(MINECRAFT_ACTION_ACTION) )
|
||||
{
|
||||
if((player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_ACTION)))
|
||||
@@ -3422,7 +3420,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
||||
}
|
||||
|
||||
if ( (player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_PAUSEMENU))
|
||||
#ifdef _DURANGO
|
||||
|
||||
#ifdef _DURANGO
|
||||
|| (player->ullButtonsPressed&(1LL<<ACTION_MENU_GTC_PAUSE))
|
||||
#endif
|
||||
)
|
||||
@@ -3442,6 +3441,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
||||
__uint64 ullButtonsPressed=player->ullButtonsPressed;
|
||||
|
||||
bool selected = false;
|
||||
|
||||
#ifdef __PSVITA__
|
||||
// 4J-PB - use the touchscreen for quickselect
|
||||
SceTouchData* pTouchData = InputManager.GetTouchPadData(iPad,false);
|
||||
@@ -3458,6 +3458,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
{
|
||||
int hotbarSlot = InputManager.GetHotbarSlotPressed(iPad);
|
||||
if (hotbarSlot >= 0 && hotbarSlot <= 9)
|
||||
{
|
||||
player->inventory->selected = hotbarSlot;
|
||||
selected = true;
|
||||
}
|
||||
}
|
||||
if( selected || wheel != 0 || (player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_DROP)) )
|
||||
{
|
||||
std::wstring itemName = L"";
|
||||
@@ -3512,7 +3520,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
||||
int wheel = Mouse.getEventDWheel();
|
||||
if (wheel != 0) {
|
||||
player->inventory.swapPaint(wheel);
|
||||
|
||||
{
|
||||
int hotbarSlot = InputManager.GetHotbarSlotPressed(iPad);
|
||||
if (hotbarSlot >= 0 && gameMode->isInputAllowed(MINECRAFT_ACTION_LEFT_SCROLL))
|
||||
{
|
||||
player->inventory->selected = hotbarSlot;
|
||||
selected = true;
|
||||
}
|
||||
}
|
||||
if (options.isFlying) {
|
||||
if (wheel > 0) wheel = 1;
|
||||
if (wheel < 0) wheel = -1;
|
||||
|
||||
Reference in New Issue
Block a user