GUI improvements
This commit is contained in:
		| @@ -1,15 +1,28 @@ | |||||||
| package refinedstorage.gui; | package refinedstorage.gui; | ||||||
|  |  | ||||||
|  | import net.minecraft.client.gui.GuiTextField; | ||||||
| import refinedstorage.container.ContainerDummy; | import refinedstorage.container.ContainerDummy; | ||||||
|  |  | ||||||
|  | import java.io.IOException; | ||||||
|  |  | ||||||
| public class GuiCraftingSettings extends GuiBase { | public class GuiCraftingSettings extends GuiBase { | ||||||
|  |     private GuiTextField amountField; | ||||||
|  |  | ||||||
|     public GuiCraftingSettings() { |     public GuiCraftingSettings() { | ||||||
|         super(new ContainerDummy(), 143, 61); |         super(new ContainerDummy(), 143, 61); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public void init(int x, int y) { |     public void init(int x, int y) { | ||||||
|         addButton(x + 56, y + 38, 50, 50, "Craft"); |         addButton(x + 48, y + 35, 50, 20, t("misc.refinedstorage:start")); | ||||||
|  |  | ||||||
|  |         amountField = new GuiTextField(0, fontRendererObj, x + 39 + 1, y + 21 + 1, 69 - 6, fontRendererObj.FONT_HEIGHT); | ||||||
|  |         amountField.setEnableBackgroundDrawing(false); | ||||||
|  |         amountField.setVisible(true); | ||||||
|  |         amountField.setText("1"); | ||||||
|  |         amountField.setTextColor(16777215); | ||||||
|  |         amountField.setCanLoseFocus(false); | ||||||
|  |         amountField.setFocused(true); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
| @@ -21,10 +34,21 @@ public class GuiCraftingSettings extends GuiBase { | |||||||
|         bindTexture("gui/crafting_settings.png"); |         bindTexture("gui/crafting_settings.png"); | ||||||
|  |  | ||||||
|         drawTexture(x, y, 0, 0, width, height); |         drawTexture(x, y, 0, 0, width, height); | ||||||
|  |  | ||||||
|  |         amountField.drawTextBox(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public void drawForeground(int mouseX, int mouseY) { |     public void drawForeground(int mouseX, int mouseY) { | ||||||
|         drawString(55, 7, "Crafting"); |         drawString(53, 7, t("container.crafting")); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     protected void keyTyped(char character, int keyCode) throws IOException { | ||||||
|  |         if (!checkHotbarKeys(keyCode) && amountField.textboxKeyTyped(character, keyCode)) { | ||||||
|  |             // NO OP | ||||||
|  |         } else { | ||||||
|  |             super.keyTyped(character, keyCode); | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ public class ItemPattern extends ItemBase { | |||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public void addInformation(ItemStack pattern, EntityPlayer player, List list, boolean b) { |     public void addInformation(ItemStack pattern, EntityPlayer player, List list, boolean b) { | ||||||
|         if (getResult(pattern) != null) { |         if (hasResult(pattern)) { | ||||||
|             list.add(getResult(pattern).getDisplayName()); |             list.add(getResult(pattern).getDisplayName()); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -40,6 +40,7 @@ misc.refinedstorage:wireless_grid.not_found=Controller not found. | |||||||
|  |  | ||||||
| misc.refinedstorage:yes=Yes | misc.refinedstorage:yes=Yes | ||||||
| misc.refinedstorage:no=No | misc.refinedstorage:no=No | ||||||
|  | misc.refinedstorage:start=Start | ||||||
| misc.refinedstorage:clear=Clear | misc.refinedstorage:clear=Clear | ||||||
| misc.refinedstorage:priority=Priority | misc.refinedstorage:priority=Priority | ||||||
|  |  | ||||||
|   | |||||||
| @@ -40,6 +40,7 @@ misc.refinedstorage:wireless_grid.not_found=Controller werd niet gevonden. | |||||||
|  |  | ||||||
| misc.refinedstorage:yes=Ja | misc.refinedstorage:yes=Ja | ||||||
| misc.refinedstorage:no=Nee | misc.refinedstorage:no=Nee | ||||||
|  | misc.refinedstorage:start=Start | ||||||
| misc.refinedstorage:clear=Legen | misc.refinedstorage:clear=Legen | ||||||
| misc.refinedstorage:priority=Prioriteit | misc.refinedstorage:priority=Prioriteit | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										
											BIN
										
									
								
								src/main/resources/assets/refinedstorage/textures/gui/crafting_monitor.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/main/resources/assets/refinedstorage/textures/gui/crafting_monitor.png
									
									
									
									
									
										Executable file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 1.8 KiB | 
		Reference in New Issue
	
	Block a user
	 Raoul Van den Berge
					Raoul Van den Berge