sp gui button size
This commit is contained in:
parent
705395472a
commit
b7fd82b170
5 changed files with 15 additions and 14 deletions
|
@ -369,7 +369,7 @@ public class Game implements IThreadListener {
|
||||||
public int tickTimeout = 2000;
|
public int tickTimeout = 2000;
|
||||||
|
|
||||||
@Variable(name = "srv_port", category = CVarCategory.WORLD, min = 0, max = 65535)
|
@Variable(name = "srv_port", category = CVarCategory.WORLD, min = 0, max = 65535)
|
||||||
public int port = 26666;
|
public int port = Config.PORT;
|
||||||
public int bind = -1;
|
public int bind = -1;
|
||||||
|
|
||||||
@Variable(name = "snd_device_type", category = CVarCategory.SOUND, display = "Tonausgabe")
|
@Variable(name = "snd_device_type", category = CVarCategory.SOUND, display = "Tonausgabe")
|
||||||
|
|
|
@ -89,7 +89,6 @@ import game.world.WorldPos;
|
||||||
import game.world.WorldServer;
|
import game.world.WorldServer;
|
||||||
|
|
||||||
public final class Server implements Runnable, IThreadListener {
|
public final class Server implements Runnable, IThreadListener {
|
||||||
// public static final int PORT = 26666;
|
|
||||||
private static final LazyLoadBase<NioEventLoopGroup> SERVER_NIO_EVENTLOOP = new LazyLoadBase<NioEventLoopGroup>() {
|
private static final LazyLoadBase<NioEventLoopGroup> SERVER_NIO_EVENTLOOP = new LazyLoadBase<NioEventLoopGroup>() {
|
||||||
protected NioEventLoopGroup load() {
|
protected NioEventLoopGroup load() {
|
||||||
return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Server IO #%d").setDaemon(true).build());
|
return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Server IO #%d").setDaemon(true).build());
|
||||||
|
|
|
@ -5,6 +5,7 @@ import game.gui.element.ActButton;
|
||||||
import game.gui.element.Label;
|
import game.gui.element.Label;
|
||||||
import game.gui.element.Textbox;
|
import game.gui.element.Textbox;
|
||||||
import game.gui.element.Textbox.Action;
|
import game.gui.element.Textbox.Action;
|
||||||
|
import game.init.Config;
|
||||||
import game.network.NetHandlerPlayServer;
|
import game.network.NetHandlerPlayServer;
|
||||||
|
|
||||||
public class GuiConnect extends Gui implements Textbox.Callback {
|
public class GuiConnect extends Gui implements Textbox.Callback {
|
||||||
|
@ -62,7 +63,7 @@ public class GuiConnect extends Gui implements Textbox.Callback {
|
||||||
}
|
}
|
||||||
int port = -1;
|
int port = -1;
|
||||||
if(this.portBox.getText().isEmpty()) {
|
if(this.portBox.getText().isEmpty()) {
|
||||||
port = 26666;
|
port = Config.PORT;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -201,19 +201,19 @@ public class GuiWorlds extends GuiList<GuiWorlds.SaveInfo> implements ActButton.
|
||||||
this.warningMessage = "Welten-Ordner nicht lesbar!";
|
this.warningMessage = "Welten-Ordner nicht lesbar!";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.add(this.selectButton = new ActButton(width / 2 - 153 - 39, height - 52, 72, 20, (ActButton.Callback)this, "Welt spielen"));
|
this.add(this.selectButton = new ActButton(width / 2 - 383, height - 52, 150, 20, (ActButton.Callback)this, "Welt spielen"));
|
||||||
this.add(this.createButton = new ActButton(width / 2 + 81 + 72 + 6 - 39, height - 52, 72, 20, (ActButton.Callback)this,
|
this.add(this.createButton = new ActButton(width / 2 + 233, height - 52, 150, 20, (ActButton.Callback)this,
|
||||||
(create ? "" : "" + TextColor.DRED) + (create ? "Neue Welt ..." : "Fehler!")));
|
(create ? "" : "" + TextColor.DRED) + (create ? "Neue Welt ..." : "Fehler!")));
|
||||||
this.add(this.deleteButton = new ActButton(width / 2 - 75 - 39, height - 28, 72, 20, (ActButton.Callback)this, "Löschen"));
|
this.add(this.deleteButton = new ActButton(width / 2 - 229, height - 28, 150, 20, (ActButton.Callback)this, "Löschen"));
|
||||||
this.add(this.pruneButton = new ActButton(width / 2 + 3 - 39, height - 28, 72, 20, (ActButton.Callback)this, "Leeren"));
|
this.add(this.pruneButton = new ActButton(width / 2 - 75, height - 28, 150, 20, (ActButton.Callback)this, "Leeren"));
|
||||||
this.add(this.copyButton = new ActButton(width / 2 - 153 - 39, height - 28, 72, 20, (ActButton.Callback)this, "Kopieren"));
|
this.add(this.copyButton = new ActButton(width / 2 - 383, height - 28, 150, 20, (ActButton.Callback)this, "Kopieren"));
|
||||||
this.add(this.moveButton = new ActButton(width / 2 + 81 - 39, height - 28, 72, 20, (ActButton.Callback)this, "Verschieben"));
|
this.add(this.moveButton = new ActButton(width / 2 + 79, height - 28, 150, 20, (ActButton.Callback)this, "Verschieben"));
|
||||||
this.add(this.seedButton = new ActButton(width / 2 + 3 - 39, height - 52, 72, 20, (ActButton.Callback)this, "Startwert"));
|
this.add(this.seedButton = new ActButton(width / 2 - 75, height - 52, 150, 20, (ActButton.Callback)this, "Startwert"));
|
||||||
this.add(this.userButton = new ActButton(width / 2 - 75 - 39, height - 52, 72, 20, (ActButton.Callback)this, "Spieler"));
|
this.add(this.userButton = new ActButton(width / 2 - 229, height - 52, 150, 20, (ActButton.Callback)this, "Spieler"));
|
||||||
this.add(this.dupeButton = new ActButton(width / 2 + 81 - 39, height - 52, 72, 20, (ActButton.Callback)this, "Duplizieren"));
|
this.add(this.dupeButton = new ActButton(width / 2 + 79, height - 52, 150, 20, (ActButton.Callback)this, "Duplizieren"));
|
||||||
this.add(new ActButton(width / 2 + 81 + 72 + 6 - 39, height - 28, 72, 20, GuiMenu.INSTANCE, "Abbrechen"));
|
this.add(new ActButton(width / 2 + 233, height - 28, 150, 20, GuiMenu.INSTANCE, "Abbrechen"));
|
||||||
|
|
||||||
this.add(new ActButton(20, 20, 200, 24, new ActButton.Callback() {
|
this.add(new ActButton(20, 20, 200, 20, new ActButton.Callback() {
|
||||||
public void use(ActButton elem, ActButton.Mode action) {
|
public void use(ActButton elem, ActButton.Mode action) {
|
||||||
if(GuiWorlds.this.gm.theWorld != null)
|
if(GuiWorlds.this.gm.theWorld != null)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -129,6 +129,7 @@ public abstract class Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int PROTOCOL = 666;
|
public static final int PROTOCOL = 666;
|
||||||
|
public static final int PORT = 26666;
|
||||||
public static final String VERSION = "v2.2.1-alpha";
|
public static final String VERSION = "v2.2.1-alpha";
|
||||||
|
|
||||||
public static final Map<String, Config.Value> VARS = new TreeMap();
|
public static final Map<String, Config.Value> VARS = new TreeMap();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue