mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-16 18:54:45 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
f1dea5460a
commit
f106b5e766
172 files changed
+2552
-2088
No files matched your search
@@ -3,19 +3,25 @@ package codechicken.nei.config;
|
||||
import static codechicken.lib.gui.GuiDraw.drawString;
|
||||
import static codechicken.lib.gui.GuiDraw.getStringWidth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import codechicken.nei.TextField;
|
||||
import codechicken.nei.config.GuiOptionList.OptionScrollSlot;
|
||||
import java.util.List;
|
||||
|
||||
public class OptionTextField extends Option {
|
||||
|
||||
private boolean focused = false;
|
||||
private TextField textField = new TextField("test") {
|
||||
|
||||
@Override
|
||||
public void onTextChange(String oldText) {
|
||||
if (focused() && isValidValue(text()))
|
||||
if (!defaulting()
|
||||
|| !text().equals(getTag().getValue())) // don't override global if text hasn't changed
|
||||
if (focused() && isValidValue(text())) if (!defaulting() || !text().equals(getTag().getValue())) // don't
|
||||
// override
|
||||
// global
|
||||
// if text
|
||||
// hasn't
|
||||
// changed
|
||||
getTag().setValue(text());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user