specify client and server

This commit is contained in:
Sen 2025-05-12 19:13:37 +02:00
parent 95b5d0e3e3
commit 1578d22e46
7 changed files with 13 additions and 11 deletions

View file

@ -1216,14 +1216,14 @@ public class Client implements IThreadListener, IClient {
// SKC.setGuiMenu(); // SKC.setGuiMenu();
// else // else
// SKC.setGuiAny(); // SKC.setGuiAny();
Window.setTitle(String.format("%s - %s", Config.VERSION, gui.getTitle())); Window.setTitle(String.format("%s - %s", Config.CLIENT_VERSION, gui.getTitle()));
} }
else else
{ {
this.menu(false); this.menu(false);
this.leftClickCounter = 10000; this.leftClickCounter = 10000;
Bind.disableMouse(); Bind.disableMouse();
Window.setTitle(String.format("%s - %s%s", Config.VERSION, "Welt / Render", this.nograb ? "" : " (Maus gefangen)")); Window.setTitle(String.format("%s - %s%s", Config.CLIENT_VERSION, "Welt / Render", this.nograb ? "" : " (Maus gefangen)"));
// SKC.setGuiNone(); // SKC.setGuiNone();
} }
} }
@ -2139,8 +2139,8 @@ public class Client implements IThreadListener, IClient {
public void run() { public void run() {
Log.SYSTEM.info("Java " + System.getProperty("java.version")); Log.SYSTEM.info("Java " + System.getProperty("java.version"));
Log.SYSTEM.info(Config.VERSION); Log.SYSTEM.info(Config.CLIENT_VERSION);
if(!Window.createWindow(Config.VERSION, System.getProperty("opengl.debug") != null)) if(!Window.createWindow(Config.CLIENT_VERSION, System.getProperty("opengl.debug") != null))
System.exit(1); System.exit(1);
Log.SYSTEM.info("OpenGL %s", GL11.glGetString(GL11.GL_VERSION)); Log.SYSTEM.info("OpenGL %s", GL11.glGetString(GL11.GL_VERSION));
Log.SYSTEM.info("GL_VENDOR: %s", GL11.glGetString(GL11.GL_VENDOR)); Log.SYSTEM.info("GL_VENDOR: %s", GL11.glGetString(GL11.GL_VENDOR));
@ -2912,7 +2912,7 @@ public class Client implements IThreadListener, IClient {
} }
public void reset() { public void reset() {
this.buffer = TextColor.NEON + "*** " + Config.VERSION + " ***"; this.buffer = TextColor.NEON + "*** " + Config.CLIENT_VERSION + " ***";
this.console.clear(); this.console.clear();
this.chat.clear(); this.chat.clear();
this.feed.clear(); this.feed.clear();

View file

@ -181,7 +181,6 @@ public class GuiConnect extends GuiList<GuiConnect.ServerInfo> implements ActBut
this.add(this.deleteButton = new ActButton(width / 2 - 75, height - 28, 150, 24, this, "Löschen")); this.add(this.deleteButton = new ActButton(width / 2 - 75, height - 28, 150, 24, this, "Löschen"));
this.add(this.editButton = new ActButton(width / 2 + 79, height - 28, 150, 24, this, "Bearbeiten")); this.add(this.editButton = new ActButton(width / 2 + 79, height - 28, 150, 24, this, "Bearbeiten"));
this.add(this.copyButton = new ActButton(width / 2 - 229, height - 28, 150, 24, this, "Kopieren")); this.add(this.copyButton = new ActButton(width / 2 - 229, height - 28, 150, 24, this, "Kopieren"));
this.add(new NavButton(4, 4, 200, 24, GuiServer.INSTANCE, "Schnellverbindung ..."));
this.add(new NavButton(width / 2 + 233, height - 28, 150, 24, GuiMenu.INSTANCE, "Abbrechen")); this.add(new NavButton(width / 2 + 233, height - 28, 150, 24, GuiMenu.INSTANCE, "Abbrechen"));
this.selectButton.enabled = false; this.selectButton.enabled = false;

View file

@ -8,7 +8,7 @@ import common.log.Log;
public class GuiInfo extends Gui { public class GuiInfo extends Gui {
private static final String VER = private static final String VER =
TextColor.GREEN + "" + TextColor.BUG + "" + TextColor.BUG + "" + TextColor.BUG + " " + TextColor.VIOLET + "" + Config.VERSION + "" + TextColor.GREEN + "" + TextColor.BUG + "" + TextColor.BUG + "" + TextColor.BUG + " " + TextColor.VIOLET + "" + Config.CLIENT_VERSION + "" +
TextColor.GREEN + " " + TextColor.BUG + "" + TextColor.BUG + "" + TextColor.BUG; TextColor.GREEN + " " + TextColor.BUG + "" + TextColor.BUG + "" + TextColor.BUG;
private static final String INFO = "Ein Spiel zur Simulation, zum Testen, für Rollenspiele, Mehrspieler und vieles mehr." + "\n" + private static final String INFO = "Ein Spiel zur Simulation, zum Testen, für Rollenspiele, Mehrspieler und vieles mehr." + "\n" +

View file

@ -52,7 +52,7 @@ public class GuiMenu extends Gui {
this.ticks = 0; this.ticks = 0;
this.hacked = 0; this.hacked = 0;
this.resetAnimation(); this.resetAnimation();
this.add(new ActButton(0, 0, 400, 24, new ActButton.Callback() { this.add(new ActButton(0, -28, 400, 24, new ActButton.Callback() {
public void use(ActButton elem, Mode action) { public void use(ActButton elem, Mode action) {
if(GuiMenu.this.hacked == 9) { if(GuiMenu.this.hacked == 9) {
GuiMenu.this.hacked++; GuiMenu.this.hacked++;
@ -63,6 +63,7 @@ public class GuiMenu extends Gui {
} }
} }
}, "Server beitreten")); }, "Server beitreten"));
this.add(new NavButton(0, 0, 400, 24, GuiServer.INSTANCE, "Schnellverbindung"));
this.add(new ActButton(0, 28, 400, 24, new ActButton.Callback() { this.add(new ActButton(0, 28, 400, 24, new ActButton.Callback() {
public void use(ActButton elem, Mode action) { public void use(ActButton elem, Mode action) {
if(GuiMenu.this.hacked == 8) if(GuiMenu.this.hacked == 8)
@ -100,7 +101,7 @@ public class GuiMenu extends Gui {
} }
}, "Client schließen")); }, "Client schließen"));
this.shift(); this.shift();
this.add(new Label(4, /* this.gm.fb_y - 2 */ 0, 200, 20, TextColor.VIOLET + Config.VERSION, true)); this.add(new Label(4, /* this.gm.fb_y - 2 */ 0, 200, 20, TextColor.VIOLET + Config.CLIENT_VERSION, true));
this.splashLabel = this.add(new Label(0, 160, width, 24, "")); this.splashLabel = this.add(new Label(0, 160, width, 24, ""));
this.pickSplash(); this.pickSplash();
} }

View file

@ -58,7 +58,7 @@ public class GuiServer extends Gui implements Textbox.Callback {
GuiServer.this.connect(); GuiServer.this.connect();
} }
}, this.server == null ? "Verbinden" : (this.server.getName().isEmpty() ? "Hinzufügen" : "Übernehmen"))); }, this.server == null ? "Verbinden" : (this.server.getName().isEmpty() ? "Hinzufügen" : "Übernehmen")));
this.add(new NavButton(0, 250, 480, 24, GuiConnect.INSTANCE, "Zurück")); this.add(new NavButton(0, 250, 480, 24, this.server != null ? GuiConnect.INSTANCE : GuiMenu.INSTANCE, "Zurück"));
if(this.server != null) if(this.server != null)
this.nameLabel = this.add(new Label(0, -70, 410, 20, "Name", true)); this.nameLabel = this.add(new Label(0, -70, 410, 20, "Name", true));
this.addrLabel = this.add(new Label(0, 0, 410, 20, "Adresse", true)); this.addrLabel = this.add(new Label(0, 0, 410, 20, "Adresse", true));

View file

@ -129,7 +129,9 @@ 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 int PORT = 26666;
public static final String NAME = "TCR";
public static final String VERSION = "v2.2.1-alpha"; public static final String VERSION = "v2.2.1-alpha";
public static final String CLIENT_VERSION = NAME + " Client " + VERSION;
public static final Map<String, Config.Value> VARS = new TreeMap(); public static final Map<String, Config.Value> VARS = new TreeMap();

View file

@ -314,7 +314,7 @@ public final class Server implements IThreadListener, IServer {
public void run(int port) { public void run(int port) {
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
Log.JNI.info("Starte Server Version " + Config.VERSION); Log.JNI.info("Starte " + Config.NAME + " Server Version " + Config.VERSION);
if(!this.debug) { if(!this.debug) {
Converter.convert(); Converter.convert();
this.setMessage("Welt wird erstellt und geladen"); this.setMessage("Welt wird erstellt und geladen");