Shift+ctrl opens crafting window
This commit is contained in:
		| @@ -52,7 +52,7 @@ public class GuiCraftingMonitor extends GuiBase { | |||||||
|         scrollbar.update(this, mouseX, mouseY); |         scrollbar.update(this, mouseX, mouseY); | ||||||
|  |  | ||||||
|         drawString(7, 7, t("gui.refinedstorage:crafting_monitor")); |         drawString(7, 7, t("gui.refinedstorage:crafting_monitor")); | ||||||
|         drawString(7, 114, t("container.inventory")); |         drawString(7, 116, t("container.inventory")); | ||||||
|  |  | ||||||
|         int ox = 11; |         int ox = 11; | ||||||
|         int x = ox; |         int x = ox; | ||||||
|   | |||||||
| @@ -4,6 +4,7 @@ import com.google.common.primitives.Ints; | |||||||
| import net.minecraft.client.gui.GuiButton; | import net.minecraft.client.gui.GuiButton; | ||||||
| import net.minecraft.client.gui.GuiTextField; | import net.minecraft.client.gui.GuiTextField; | ||||||
| import net.minecraftforge.fml.client.FMLClientHandler; | import net.minecraftforge.fml.client.FMLClientHandler; | ||||||
|  | import org.lwjgl.input.Keyboard; | ||||||
| import refinedstorage.container.ContainerDummy; | import refinedstorage.container.ContainerDummy; | ||||||
|  |  | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
| @@ -56,16 +57,25 @@ public class GuiCraftingSettings extends GuiBase { | |||||||
|     protected void keyTyped(char character, int keyCode) throws IOException { |     protected void keyTyped(char character, int keyCode) throws IOException { | ||||||
|         if (!checkHotbarKeys(keyCode) && amountField.textboxKeyTyped(character, keyCode)) { |         if (!checkHotbarKeys(keyCode) && amountField.textboxKeyTyped(character, keyCode)) { | ||||||
|             // NO OP |             // NO OP | ||||||
|  |         } else { | ||||||
|  |             if (keyCode == Keyboard.KEY_RETURN) { | ||||||
|  |                 startRequest(); | ||||||
|             } else { |             } else { | ||||||
|                 super.keyTyped(character, keyCode); |                 super.keyTyped(character, keyCode); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     protected void actionPerformed(GuiButton button) throws IOException { |     protected void actionPerformed(GuiButton button) throws IOException { | ||||||
|         super.actionPerformed(button); |         super.actionPerformed(button); | ||||||
|  |  | ||||||
|         if (button.id == startButton.id) { |         if (button.id == startButton.id) { | ||||||
|  |             startRequest(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void startRequest() { | ||||||
|         Integer quantity = Ints.tryParse(amountField.getText()); |         Integer quantity = Ints.tryParse(amountField.getText()); | ||||||
|  |  | ||||||
|         if (quantity != null && quantity > 0) { |         if (quantity != null && quantity > 0) { | ||||||
| @@ -75,4 +85,3 @@ public class GuiCraftingSettings extends GuiBase { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| } |  | ||||||
|   | |||||||
| @@ -312,7 +312,7 @@ public class GuiGrid extends GuiBase { | |||||||
|             } else if (isHoveringOverSlot() && container.getPlayer().inventory.getItemStack() != null && (clickedButton == 0 || clickedButton == 1)) { |             } else if (isHoveringOverSlot() && container.getPlayer().inventory.getItemStack() != null && (clickedButton == 0 || clickedButton == 1)) { | ||||||
|                 grid.onItemPush(-1, clickedButton == 1); |                 grid.onItemPush(-1, clickedButton == 1); | ||||||
|             } else if (isHoveringOverItemInSlot() && container.getPlayer().inventory.getItemStack() == null) { |             } else if (isHoveringOverItemInSlot() && container.getPlayer().inventory.getItemStack() == null) { | ||||||
|                 if (items.get(hoveringSlot).getQuantity() == 0) { |                 if (items.get(hoveringSlot).getQuantity() == 0 || (GuiScreen.isShiftKeyDown() && GuiScreen.isCtrlKeyDown())) { | ||||||
|                     FMLCommonHandler.instance().showGuiScreen(new GuiCraftingSettings(this, hoveringItemId)); |                     FMLCommonHandler.instance().showGuiScreen(new GuiCraftingSettings(this, hoveringItemId)); | ||||||
|                 } else { |                 } else { | ||||||
|                     int flags = 0; |                     int flags = 0; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Raoul Van den Berge
					Raoul Van den Berge