better network structure
Some checks failed
Linux arm64 / Build (push) Has been cancelled

This commit is contained in:
2025-01-23 22:24:23 +01:00
parent 5e99cd92df
commit bfe98a2cf0
22 changed files with 248 additions and 93 deletions

View File

@@ -6,17 +6,12 @@ import imgui.ImGui;
import imgui.ImVec2;
import imgui.type.ImInt;
import imgui.type.ImString;
import network.client.Client;
import network.server.Server;
public class MultiMenu extends BaseView {
private final ImInt port = new ImInt(25565);
private final ImString address = new ImString("localhost");
private Server server;
private Client client;
public MultiMenu(StateMachine stateMachine) {
super(stateMachine);
}

View File

@@ -27,7 +27,7 @@ public class StateMachine {
}
public void popState() {
menus.getLast().onKill();
menus.get(menus.size() - 1).onKill();
menus.pop();
}
@@ -43,7 +43,7 @@ public class StateMachine {
ImGui.setNextWindowSize(displaySize);
ImGui.begin("##Main Window", null, ImGuiWindowFlags.NoDecoration | ImGuiWindowFlags.NoMove
| ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoBackground);
menus.getLast().render();
menus.get(menus.size() - 1).render();
ImGui.end();
checkEscape();
}