mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-05-21 23:56:50 +00:00
Fix SetOpacityTimer in Keyboard and Mouse
This commit is contained in:
@@ -1501,13 +1501,9 @@ void Minecraft::run_middle()
|
||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_INVENTORY))
|
||||
{
|
||||
if(isClosableByEitherKey && !isEditing)
|
||||
{
|
||||
ui.CloseUIScenes(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_INVENTORY;
|
||||
}
|
||||
}
|
||||
|
||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_DROP))
|
||||
@@ -1515,15 +1511,11 @@ void Minecraft::run_middle()
|
||||
|
||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_CRAFTING) || g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_CRAFTING_ALT))
|
||||
{
|
||||
if((ui.IsSceneInStack(i, eUIScene_Crafting2x2Menu) || ui.IsSceneInStack(i, eUIScene_Crafting3x3Menu) || ui.IsSceneInStack(i, eUIScene_CreativeMenu) || ui.IsSceneInStack(i, eUIScene_ClassicCraftingMenu) || isClosableByEitherKey) && !isEditing)
|
||||
{
|
||||
ui.CloseUIScenes(i);
|
||||
if((ui.IsSceneInStack(i, eUIScene_Crafting2x2Menu) || ui.IsSceneInStack(i, eUIScene_Crafting3x3Menu) || ui.IsSceneInStack(i, eUIScene_CreativeMenu) || ui.IsSceneInStack(i, eUIScene_ClassicCraftingMenu) || isClosableByEitherKey) && !isEditing)
|
||||
ui.CloseUIScenes(i);
|
||||
else
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_CRAFTING;
|
||||
}
|
||||
else
|
||||
{
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_CRAFTING;
|
||||
}
|
||||
}
|
||||
|
||||
for (int slot = 0; slot < 9; slot++)
|
||||
{
|
||||
@@ -1531,8 +1523,20 @@ void Minecraft::run_middle()
|
||||
{
|
||||
if (localplayers[i]->inventory)
|
||||
localplayers[i]->inventory->selected = slot;
|
||||
|
||||
app.SetOpacityTimer(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (g_KBMInput.PeekMouseWheel())
|
||||
app.SetOpacityTimer(i);
|
||||
|
||||
// In flying mode, Shift held = sneak/descend
|
||||
if(g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_SNEAK))
|
||||
{
|
||||
if (localplayers[i]->abilities.flying && !ui.GetMenuDisplayed(i))
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_SNEAK_TOGGLE;
|
||||
}
|
||||
}
|
||||
|
||||
// Utility keys always work regardless of KBM active state
|
||||
@@ -1552,13 +1556,6 @@ void Minecraft::run_middle()
|
||||
|
||||
if (g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_SCREENSHOT))
|
||||
localplayers[i]->ullButtonsPressed|=1LL<< MINECRAFT_ACTION_SCREENSHOT;
|
||||
|
||||
// In flying mode, Shift held = sneak/descend
|
||||
if(g_KBMInput.IsKBMActive() && g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_SNEAK))
|
||||
{
|
||||
if (localplayers[i]->abilities.flying && !ui.GetMenuDisplayed(i))
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_SNEAK_TOGGLE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user