mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
smalle fixes aan turn updates
This commit is contained in:
@@ -151,8 +151,6 @@ public final class Server {
|
|||||||
.listen(NetworkEvents.GameResultResponse.class, this::handleGameResult, false)
|
.listen(NetworkEvents.GameResultResponse.class, this::handleGameResult, false)
|
||||||
.listen(NetworkEvents.GameMoveResponse.class, this::handleReceivedMove, false)
|
.listen(NetworkEvents.GameMoveResponse.class, this::handleReceivedMove, false)
|
||||||
.listen(NetworkEvents.YourTurnResponse.class, this::handleYourTurn, false);
|
.listen(NetworkEvents.YourTurnResponse.class, this::handleYourTurn, false);
|
||||||
startPopulateScheduler();
|
|
||||||
populateGameList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendChallenge(String opponent) {
|
private void sendChallenge(String opponent) {
|
||||||
|
|||||||
@@ -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
|
//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")) {
|
if (AppContext.getLocale().toLanguageTag().equals("en")) {
|
||||||
turnHeader.setText(currentPlayer + keyThingy.getText());
|
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
|
player1Header
|
||||||
);
|
);
|
||||||
|
|
||||||
|
player1box.getStyleClass().add("hboxspacing");
|
||||||
|
|
||||||
var player2box = Primitive.hbox(
|
var player2box = Primitive.hbox(
|
||||||
player2Icon,
|
player2Icon,
|
||||||
player2Header
|
player2Header
|
||||||
);
|
);
|
||||||
|
|
||||||
|
player2box.getStyleClass().add("hboxspacing");
|
||||||
|
|
||||||
var playerInfo = Primitive.vbox(
|
var playerInfo = Primitive.vbox(
|
||||||
playerHeader,
|
playerHeader,
|
||||||
Primitive.separator(),
|
Primitive.separator(),
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
-fx-effect: dropshadow(gaussian, #88cc8899, 5, 0, 0, 1);
|
-fx-effect: dropshadow(gaussian, #88cc8899, 5, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-turn {
|
.text.my-turn {
|
||||||
-fx-fill: #e05656;
|
-fx-fill: #e05656;
|
||||||
-fx-font-weight: bold;
|
-fx-font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
-fx-effect: dropshadow(gaussian, #70e070cc, 6, 0, 0, 2);
|
-fx-effect: dropshadow(gaussian, #70e070cc, 6, 0, 0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-turn {
|
.text.my-turn {
|
||||||
-fx-fill: #ff4b4b;
|
-fx-fill: #ff4b4b;
|
||||||
-fx-font-weight: bold;
|
-fx-font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,11 @@
|
|||||||
-fx-spacing: 14;
|
-fx-spacing: 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hboxspacing {
|
||||||
|
-fx-padding: 2;
|
||||||
|
-fx-spacing: 10;
|
||||||
|
}
|
||||||
|
|
||||||
.current-player {
|
.current-player {
|
||||||
-fx-font-size: 32px;
|
-fx-font-size: 32px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
-fx-effect: dropshadow(gaussian, #aad3aa99, 4, 0, 0, 1);
|
-fx-effect: dropshadow(gaussian, #aad3aa99, 4, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-turn {
|
.text.my-turn {
|
||||||
-fx-fill: #d14b4b;
|
-fx-fill: #d14b4b;
|
||||||
-fx-font-weight: bold;
|
-fx-font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,11 @@
|
|||||||
-fx-spacing: 10;
|
-fx-spacing: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hboxspacing {
|
||||||
|
-fx-padding: 2;
|
||||||
|
-fx-spacing: 10;
|
||||||
|
}
|
||||||
|
|
||||||
.current-player {
|
.current-player {
|
||||||
-fx-font-size: 24px;
|
-fx-font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,11 @@
|
|||||||
-fx-spacing: 6;
|
-fx-spacing: 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hboxspacing {
|
||||||
|
-fx-padding: 2;
|
||||||
|
-fx-spacing: 10;
|
||||||
|
}
|
||||||
|
|
||||||
.current-player {
|
.current-player {
|
||||||
-fx-font-size: 16px;
|
-fx-font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user