diff options
author | Kiwi <42833050+Kiwi233@users.noreply.github.com> | 2020-12-13 21:24:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-13 21:24:20 +0800 |
commit | d567ee9f63c6e11f2b21f26687cfc2ecaed200a1 (patch) | |
tree | 8e4c275624a966c4482b90ad85cda2375c6a63b9 /src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java | |
parent | cec32d0a604156802eee3f9e8fefccb40a62d7ef (diff) | |
parent | 7ce77a615de68add2bb0fa71818b3e36241a02a7 (diff) | |
download | GT5-Unofficial-d567ee9f63c6e11f2b21f26687cfc2ecaed200a1.tar.gz GT5-Unofficial-d567ee9f63c6e11f2b21f26687cfc2ecaed200a1.tar.bz2 GT5-Unofficial-d567ee9f63c6e11f2b21f26687cfc2ecaed200a1.zip |
Merge pull request #2 from GTNewHorizons/experimental
5.09.33.57
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.java | 12 |
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; + } } |