Use GuiScreen.isShiftKeyDown(), add scrollbar textures
This commit is contained in:
		@@ -2,12 +2,12 @@ package refinedstorage.container;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import net.minecraft.client.gui.GuiScreen;
 | 
				
			||||||
import net.minecraft.entity.player.EntityPlayer;
 | 
					import net.minecraft.entity.player.EntityPlayer;
 | 
				
			||||||
import net.minecraft.inventory.ClickType;
 | 
					import net.minecraft.inventory.ClickType;
 | 
				
			||||||
import net.minecraft.inventory.Container;
 | 
					import net.minecraft.inventory.Container;
 | 
				
			||||||
import net.minecraft.inventory.Slot;
 | 
					import net.minecraft.inventory.Slot;
 | 
				
			||||||
import net.minecraft.item.ItemStack;
 | 
					import net.minecraft.item.ItemStack;
 | 
				
			||||||
import org.lwjgl.input.Keyboard;
 | 
					 | 
				
			||||||
import refinedstorage.container.slot.SlotDisabled;
 | 
					import refinedstorage.container.slot.SlotDisabled;
 | 
				
			||||||
import refinedstorage.container.slot.SlotSpecimen;
 | 
					import refinedstorage.container.slot.SlotSpecimen;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -82,7 +82,7 @@ public abstract class ContainerBase extends Container
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
				else if (slot.getStack() != null)
 | 
									else if (slot.getStack() != null)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
 | 
										if (GuiScreen.isShiftKeyDown())
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						slot.putStack(null);
 | 
											slot.putStack(null);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,12 +6,12 @@ import java.util.Comparator;
 | 
				
			|||||||
import java.util.Iterator;
 | 
					import java.util.Iterator;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import net.minecraft.client.audio.PositionedSoundRecord;
 | 
					import net.minecraft.client.audio.PositionedSoundRecord;
 | 
				
			||||||
 | 
					import net.minecraft.client.gui.GuiScreen;
 | 
				
			||||||
import net.minecraft.client.gui.GuiTextField;
 | 
					import net.minecraft.client.gui.GuiTextField;
 | 
				
			||||||
import net.minecraft.client.renderer.GlStateManager;
 | 
					import net.minecraft.client.renderer.GlStateManager;
 | 
				
			||||||
import net.minecraft.client.renderer.RenderHelper;
 | 
					import net.minecraft.client.renderer.RenderHelper;
 | 
				
			||||||
import net.minecraft.init.SoundEvents;
 | 
					import net.minecraft.init.SoundEvents;
 | 
				
			||||||
import net.minecraft.inventory.Slot;
 | 
					import net.minecraft.inventory.Slot;
 | 
				
			||||||
import org.lwjgl.input.Keyboard;
 | 
					 | 
				
			||||||
import org.lwjgl.input.Mouse;
 | 
					import org.lwjgl.input.Mouse;
 | 
				
			||||||
import refinedstorage.RefinedStorage;
 | 
					import refinedstorage.RefinedStorage;
 | 
				
			||||||
import refinedstorage.block.EnumGridType;
 | 
					import refinedstorage.block.EnumGridType;
 | 
				
			||||||
@@ -40,7 +40,7 @@ public class GuiGrid extends GuiBase
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	public GuiGrid(ContainerGrid container, TileGrid grid)
 | 
						public GuiGrid(ContainerGrid container, TileGrid grid)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		super(container, 176, grid.getType() == EnumGridType.CRAFTING ? 256 : 190);
 | 
							super(container, 193, grid.getType() == EnumGridType.CRAFTING ? 256 : 190);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.container = container;
 | 
							this.container = container;
 | 
				
			||||||
		this.grid = grid;
 | 
							this.grid = grid;
 | 
				
			||||||
@@ -301,7 +301,7 @@ public class GuiGrid extends GuiBase
 | 
				
			|||||||
			else if (isHoveringOverValidSlot(getItems()) && container.getPlayer().inventory.getItemStack() == null)
 | 
								else if (isHoveringOverValidSlot(getItems()) && container.getPlayer().inventory.getItemStack() == null)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				boolean half = clickedButton == 1;
 | 
									boolean half = clickedButton == 1;
 | 
				
			||||||
				boolean shift = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT);
 | 
									boolean shift = GuiScreen.isShiftKeyDown();
 | 
				
			||||||
				boolean one = clickedButton == 2;
 | 
									boolean one = clickedButton == 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				RefinedStorage.NETWORK.sendToServer(new MessageStoragePull(controller.getPos().getX(), controller.getPos().getY(), controller.getPos().getZ(), hoveringId, half, one, shift));
 | 
									RefinedStorage.NETWORK.sendToServer(new MessageStoragePull(controller.getPos().getX(), controller.getPos().getY(), controller.getPos().getZ(), hoveringId, half, one, shift));
 | 
				
			||||||
@@ -316,7 +316,7 @@ public class GuiGrid extends GuiBase
 | 
				
			|||||||
				{
 | 
									{
 | 
				
			||||||
					if (inBounds(slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX - guiLeft, mouseY - guiTop))
 | 
										if (inBounds(slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX - guiLeft, mouseY - guiTop))
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
 | 
											if (GuiScreen.isShiftKeyDown())
 | 
				
			||||||
						{
 | 
											{
 | 
				
			||||||
							RefinedStorage.NETWORK.sendToServer(new MessageStoragePush(controller.getPos().getX(), controller.getPos().getY(), controller.getPos().getZ(), slot.slotNumber, clickedButton == 1));
 | 
												RefinedStorage.NETWORK.sendToServer(new MessageStoragePush(controller.getPos().getX(), controller.getPos().getY(), controller.getPos().getZ(), slot.slotNumber, clickedButton == 1));
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.1 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB  | 
		Reference in New Issue
	
	Block a user