smalle fixes aan turn updates

This commit is contained in:
michiel301b
2025-12-03 23:16:03 +01:00
parent 406ad713f4
commit a00d25f24a
8 changed files with 22 additions and 15 deletions

View File

@@ -151,8 +151,6 @@ public final class Server {
.listen(NetworkEvents.GameResultResponse.class, this::handleGameResult, false)
.listen(NetworkEvents.GameMoveResponse.class, this::handleReceivedMove, false)
.listen(NetworkEvents.YourTurnResponse.class, this::handleYourTurn, false);
startPopulateScheduler();
populateGameList();
}
private void sendChallenge(String opponent) {

View File

@@ -108,16 +108,6 @@ public final class GameView extends ViewWidget {
//TODO idk if theres any way to check this? only EN uses 's and the rest doesnt. if theres a better way to do this pls let me know
if (AppContext.getLocale().toLanguageTag().equals("en")) {
turnHeader.setText(currentPlayer + keyThingy.getText());
}
else {
turnHeader.setText(currentPlayer + " " + keyThingy.getText());
}
if (isMe) {
turnHeader.getStyleClass().add("my-turn");
}
else {
turnHeader.getStyleClass().remove("my-turn");
}
});
}
@@ -168,11 +158,15 @@ public final class GameView extends ViewWidget {
player1Header
);
player1box.getStyleClass().add("hboxspacing");
var player2box = Primitive.hbox(
player2Icon,
player2Header
);
player2box.getStyleClass().add("hboxspacing");
var playerInfo = Primitive.vbox(
playerHeader,
Primitive.separator(),

View File

@@ -155,7 +155,7 @@
-fx-effect: dropshadow(gaussian, #88cc8899, 5, 0, 0, 1);
}
.my-turn {
.text.my-turn {
-fx-fill: #e05656;
-fx-font-weight: bold;
}

View File

@@ -155,7 +155,7 @@
-fx-effect: dropshadow(gaussian, #70e070cc, 6, 0, 0, 2);
}
.my-turn {
.text.my-turn {
-fx-fill: #ff4b4b;
-fx-font-weight: bold;
}

View File

@@ -23,6 +23,11 @@
-fx-spacing: 14;
}
.hboxspacing {
-fx-padding: 2;
-fx-spacing: 10;
}
.current-player {
-fx-font-size: 32px;
}

View File

@@ -156,7 +156,7 @@
-fx-effect: dropshadow(gaussian, #aad3aa99, 4, 0, 0, 1);
}
.my-turn {
.text.my-turn {
-fx-fill: #d14b4b;
-fx-font-weight: bold;
}

View File

@@ -23,6 +23,11 @@
-fx-spacing: 10;
}
.hboxspacing {
-fx-padding: 2;
-fx-spacing: 10;
}
.current-player {
-fx-font-size: 24px;
}

View File

@@ -23,6 +23,11 @@
-fx-spacing: 6;
}
.hboxspacing {
-fx-padding: 2;
-fx-spacing: 10;
}
.current-player {
-fx-font-size: 16px;
}