fixed overlapping back and disconnect buttons

This commit is contained in:
ramollia
2025-12-04 16:06:43 +01:00
parent 4ea458c92e
commit 72d5989d24
2 changed files with 6 additions and 1 deletions

View File

@@ -123,7 +123,7 @@ public final class Server {
new EventFlow().addPostEvent(new NetworkEvents.SendLogin(clientId, user)).postEvent(); new EventFlow().addPostEvent(new NetworkEvents.SendLogin(clientId, user)).postEvent();
primary = new ServerView(user, this::sendChallenge, this::disconnect); primary = new ServerView(user, this::sendChallenge, this::disconnect);
WidgetContainer.getCurrentView().transitionNext(primary); WidgetContainer.getCurrentView().transitionNextCustom(primary);
startPopulateScheduler(); startPopulateScheduler();
populateGameList(); populateGameList();

View File

@@ -37,6 +37,11 @@ public abstract class ViewWidget extends StackWidget {
view.add(Pos.BOTTOM_LEFT, Primitive.vbox(backButton)); view.add(Pos.BOTTOM_LEFT, Primitive.vbox(backButton));
} }
public void transitionNextCustom(ViewWidget view) {
view.previous = this;
replace(Pos.CENTER, view);
}
public void transitionPrevious() { public void transitionPrevious() {
if (previous == null) { if (previous == null) {
return; return;