mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-17 11:05:07 +00:00
Unified build script (#175)
* Update build script * Update build script to import fix for shadow in dev and sources artifacts * Update fixed build script to shadow csv dependency in dev jar as well * Moved jitpack * Move new files
This commit is contained in:
1 parent
43b71b1de6
commit
a7ca6c8527
188 files changed
+646
-968
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package codechicken.nei.config;
|
||||
|
||||
public class OptionToggleButton extends OptionButton
|
||||
{
|
||||
public final boolean prefixed;
|
||||
|
||||
public OptionToggleButton(String name, boolean prefixed) {
|
||||
super(name);
|
||||
this.prefixed = prefixed;
|
||||
}
|
||||
|
||||
public OptionToggleButton(String name) {
|
||||
this(name, false);
|
||||
}
|
||||
|
||||
public boolean state() {
|
||||
return renderTag().getBooleanValue();
|
||||
}
|
||||
|
||||
public String getButtonText() {
|
||||
return translateN(name + (state() ? ".true" : ".false"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefix() {
|
||||
return prefixed ? translateN(name) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClick(int button) {
|
||||
getTag().setBooleanValue(!state());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user