sp gui button size

This commit is contained in:
Sen 2025-03-11 23:30:22 +01:00
parent 705395472a
commit b7fd82b170
5 changed files with 15 additions and 14 deletions

View file

@ -369,7 +369,7 @@ public class Game implements IThreadListener {
public int tickTimeout = 2000;
@Variable(name = "srv_port", category = CVarCategory.WORLD, min = 0, max = 65535)
public int port = 26666;
public int port = Config.PORT;
public int bind = -1;
@Variable(name = "snd_device_type", category = CVarCategory.SOUND, display = "Tonausgabe")

View file

@ -89,7 +89,6 @@ import game.world.WorldPos;
import game.world.WorldServer;
public final class Server implements Runnable, IThreadListener {
// public static final int PORT = 26666;
private static final LazyLoadBase<NioEventLoopGroup> SERVER_NIO_EVENTLOOP = new LazyLoadBase<NioEventLoopGroup>() {
protected NioEventLoopGroup load() {
return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Server IO #%d").setDaemon(true).build());

View file

@ -5,6 +5,7 @@ import game.gui.element.ActButton;
import game.gui.element.Label;
import game.gui.element.Textbox;
import game.gui.element.Textbox.Action;
import game.init.Config;
import game.network.NetHandlerPlayServer;
public class GuiConnect extends Gui implements Textbox.Callback {
@ -62,7 +63,7 @@ public class GuiConnect extends Gui implements Textbox.Callback {
}
int port = -1;
if(this.portBox.getText().isEmpty()) {
port = 26666;
port = Config.PORT;
}
else {
try {

View file

@ -201,19 +201,19 @@ public class GuiWorlds extends GuiList<GuiWorlds.SaveInfo> implements ActButton.
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.createButton = new ActButton(width / 2 + 81 + 72 + 6 - 39, height - 52, 72, 20, (ActButton.Callback)this,
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 + 233, height - 52, 150, 20, (ActButton.Callback)this,
(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.pruneButton = new ActButton(width / 2 + 3 - 39, height - 28, 72, 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.moveButton = new ActButton(width / 2 + 81 - 39, height - 28, 72, 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.userButton = new ActButton(width / 2 - 75 - 39, height - 52, 72, 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(new ActButton(width / 2 + 81 + 72 + 6 - 39, height - 28, 72, 20, GuiMenu.INSTANCE, "Abbrechen"));
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 - 75, height - 28, 150, 20, (ActButton.Callback)this, "Leeren"));
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 + 79, height - 28, 150, 20, (ActButton.Callback)this, "Verschieben"));
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 - 229, height - 52, 150, 20, (ActButton.Callback)this, "Spieler"));
this.add(this.dupeButton = new ActButton(width / 2 + 79, height - 52, 150, 20, (ActButton.Callback)this, "Duplizieren"));
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) {
if(GuiWorlds.this.gm.theWorld != null)
return;

View file

@ -129,6 +129,7 @@ public abstract class Config {
}
public static final int PROTOCOL = 666;
public static final int PORT = 26666;
public static final String VERSION = "v2.2.1-alpha";
public static final Map<String, Config.Value> VARS = new TreeMap();