aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2020-06-04 16:36:59 +0200
committerGitHub <noreply@github.com>2020-06-04 16:36:59 +0200
commit2f3676ff64faa743ea2ac4e558f6537146088cd6 (patch)
tree7b72857681f87f502f48f39af2fb3e5c5c5a2d74 /src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
parente962a457e49216f6b3c8326433cace302c137485 (diff)
parent0e2794bb58cce84b5daf7fd85a124550fff6de4c (diff)
downloadGT5-Unofficial-2f3676ff64faa743ea2ac4e558f6537146088cd6.tar.gz
GT5-Unofficial-2f3676ff64faa743ea2ac4e558f6537146088cd6.tar.bz2
GT5-Unofficial-2f3676ff64faa743ea2ac4e558f6537146088cd6.zip
Merge pull request #300 from moller21/cover_guis
Cover guis
Diffstat (limited to 'src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java')
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
index 3f6fe64e73..e2ba53e4c9 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
@@ -10,6 +10,7 @@ public class GT_GuiIntegerTextBox extends GuiTextField implements IGuiScreen.IGu
private final int x0, y0;
private final IGuiScreen gui;
public final int id;
+ private boolean enabled;
public GT_GuiIntegerTextBox(IGuiScreen gui, int id, int x, int y, int width, int height) {
super(Minecraft.getMinecraft().fontRenderer, x, y, width, height);
@@ -18,6 +19,7 @@ public class GT_GuiIntegerTextBox extends GuiTextField implements IGuiScreen.IGu
x0 = x;
y0 = y;
this.gui = gui;
+ enabled = true;
gui.addElement(this);
}
@@ -47,4 +49,14 @@ public class GT_GuiIntegerTextBox extends GuiTextField implements IGuiScreen.IGu
}
return false;
}
+
+ @Override
+ public void setEnabled(boolean p_146184_1_) {
+ super.setEnabled(p_146184_1_);
+ enabled = p_146184_1_;
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
}