gui disabled colors
This commit is contained in:
parent
6a6a820963
commit
3316c42ed8
10 changed files with 64 additions and 19 deletions
|
@ -112,7 +112,7 @@ public class GuiMenu extends Gui {
|
|||
if(!this.gm.charEditor)
|
||||
this.add(new NavButton(202, 28, 198, 24, GuiCharacters.INSTANCE, "Charakter"));
|
||||
if(!this.gm.isRemote() && !this.gm.debugWorld) {
|
||||
this.add(new Textbox(0, 56, 96, 24, 5, true, new Textbox.Callback() {
|
||||
final Textbox portBox = this.add(new Textbox(0, 56, 96, 24, 5, true, new Textbox.Callback() {
|
||||
public void use(Textbox elem, Action value) {
|
||||
if(value == Action.SEND || value == Action.UNFOCUS) {
|
||||
int port = -1;
|
||||
|
@ -128,10 +128,12 @@ public class GuiMenu extends Gui {
|
|||
}
|
||||
}
|
||||
}, "" + this.gm.port)); // "srv_port"
|
||||
portBox.enabled = this.gm.bind == -1;
|
||||
this.add(new ActButton(100, 56, 300, 24, new ActButton.Callback() {
|
||||
public void use(ActButton elem, ActButton.Mode action) {
|
||||
GuiMenu.this.gm.bind(GuiMenu.this.gm.bind = (GuiMenu.this.gm.bind != -1 ? -1 : GuiMenu.this.gm.port));
|
||||
elem.setText(GuiMenu.this.gm.bind != -1 ? "LAN-Welt schließen" : "LAN-Welt öffnen");
|
||||
portBox.enabled = GuiMenu.this.gm.bind == -1;
|
||||
}
|
||||
}, this.gm.bind != -1 ? "LAN-Welt schließen" : "LAN-Welt öffnen"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue