mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
GUIs are back!
This commit is contained in:
1 parent
0179ea1f38
commit
bc024b851f
69 files changed
+372
-229
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
@@ -18,7 +19,7 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -43,7 +44,7 @@ public class GuiLaserAmplifier extends GuiMekanism
|
||||
guiElements.add(new GuiNumberGauge(new INumberInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public IIcon getIcon()
|
||||
public TextureAtlasSprite getIcon()
|
||||
{
|
||||
return MekanismRenderer.energyIcon;
|
||||
}
|
||||
@@ -113,7 +114,7 @@ public class GuiLaserAmplifier extends GuiMekanism
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int button)
|
||||
public void mouseClicked(int mouseX, int mouseY, int button) throws IOException
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, button);
|
||||
|
||||
@@ -123,7 +124,7 @@ public class GuiLaserAmplifier extends GuiMekanism
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyTyped(char c, int i)
|
||||
public void keyTyped(char c, int i) throws IOException
|
||||
{
|
||||
if(!(minField.isFocused() || maxField.isFocused() || timerField.isFocused()) || i == Keyboard.KEY_ESCAPE)
|
||||
{
|
||||
@@ -226,18 +227,18 @@ public class GuiLaserAmplifier extends GuiMekanism
|
||||
|
||||
String prevTime = timerField != null ? timerField.getText() : "";
|
||||
|
||||
timerField = new GuiTextField(fontRendererObj, guiWidth + 96, guiHeight + 28, 36, 11);
|
||||
timerField = new GuiTextField(0, fontRendererObj, guiWidth + 96, guiHeight + 28, 36, 11);
|
||||
timerField.setMaxStringLength(4);
|
||||
timerField.setText(prevTime);
|
||||
|
||||
String prevMin = minField != null ? minField.getText() : "";
|
||||
minField = new GuiTextField(fontRendererObj, guiWidth + 96, guiHeight + 43, 72, 11);
|
||||
minField = new GuiTextField(1, fontRendererObj, guiWidth + 96, guiHeight + 43, 72, 11);
|
||||
minField.setMaxStringLength(10);
|
||||
minField.setText(prevMin);
|
||||
|
||||
String prevMax = maxField != null ? maxField.getText() : "";
|
||||
|
||||
maxField = new GuiTextField(fontRendererObj, guiWidth + 96, guiHeight + 58, 72, 11);
|
||||
maxField = new GuiTextField(2, fontRendererObj, guiWidth + 96, guiHeight + 58, 72, 11);
|
||||
maxField.setMaxStringLength(10);
|
||||
maxField.setText(prevMax);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user