mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-08 06:48:40 +00:00
Add toggle inventory/crafting with E and C/R keys (#593)
This commit is contained in:
parent
8dee53a565
commit
8f2ae54b3a
|
|
@ -1480,13 +1480,31 @@ void Minecraft::run_middle()
|
|||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_USE;
|
||||
|
||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_INVENTORY))
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_INVENTORY;
|
||||
{
|
||||
if(ui.IsSceneInStack(i, eUIScene_InventoryMenu))
|
||||
{
|
||||
ui.CloseUIScenes(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_INVENTORY;
|
||||
}
|
||||
}
|
||||
|
||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_DROP))
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_DROP;
|
||||
|
||||
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.CloseUIScenes(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_CRAFTING;
|
||||
}
|
||||
}
|
||||
|
||||
for (int slot = 0; slot < 9; slot++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue