mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
gui refactor
This commit is contained in:
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
||||||
41
.idea/resourceBundles.xml
generated
41
.idea/resourceBundles.xml
generated
@@ -1,41 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ResourceBundleManager">
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_ar.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_de.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_en.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_es.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_fr.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_hi.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_it.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_ja.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_ko.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_nl.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_ru.properties" />
|
|
||||||
<file url="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_zh.properties" />
|
|
||||||
<custom-resource-bundle>
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/Localization_de.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/Localization_es.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/Localization_fr.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/Localization_it.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/Localization_nl.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/Localization_zh.properties" />
|
|
||||||
<base-name>localization</base-name>
|
|
||||||
</custom-resource-bundle>
|
|
||||||
<custom-resource-bundle>
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_ar.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_de.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_en.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_es.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_fr.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_hi.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_it.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_ja.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_ko.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_nl.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_ru.properties" />
|
|
||||||
<file value="file://$PROJECT_DIR$/app/src/main/resources/assets/localization/localization_zh.properties" />
|
|
||||||
<base-name>localization</base-name>
|
|
||||||
</custom-resource-bundle>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -1,29 +1,24 @@
|
|||||||
package org.toop.app;
|
package org.toop.app;
|
||||||
|
|
||||||
import javafx.application.Platform;
|
import org.toop.app.view.ViewStack;
|
||||||
import org.toop.app.layer.Layer;
|
import org.toop.app.view.views.MainView;
|
||||||
import org.toop.app.layer.layers.MainLayer;
|
import org.toop.app.view.views.QuitView;
|
||||||
import org.toop.app.layer.layers.QuitPopup;
|
|
||||||
import org.toop.framework.asset.ResourceManager;
|
import org.toop.framework.asset.ResourceManager;
|
||||||
import org.toop.framework.asset.resources.CssAsset;
|
import org.toop.framework.asset.resources.CssAsset;
|
||||||
import org.toop.framework.audio.events.AudioEvents;
|
import org.toop.framework.audio.events.AudioEvents;
|
||||||
import org.toop.framework.eventbus.EventFlow;
|
import org.toop.framework.eventbus.EventFlow;
|
||||||
import org.toop.local.AppContext;
|
import org.toop.local.AppContext;
|
||||||
|
import org.toop.local.AppSettings;
|
||||||
|
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.toop.local.AppSettings;
|
|
||||||
|
|
||||||
import java.util.Stack;
|
|
||||||
|
|
||||||
public final class App extends Application {
|
public final class App extends Application {
|
||||||
private static Stage stage;
|
private static Stage stage;
|
||||||
private static Scene scene;
|
private static Scene scene;
|
||||||
private static StackPane root;
|
|
||||||
|
|
||||||
private static Stack<Layer> stack;
|
|
||||||
private static int height;
|
private static int height;
|
||||||
private static int width;
|
private static int width;
|
||||||
|
|
||||||
@@ -37,17 +32,15 @@ public final class App extends Application {
|
|||||||
public void start(Stage stage) throws Exception {
|
public void start(Stage stage) throws Exception {
|
||||||
final StackPane root = new StackPane();
|
final StackPane root = new StackPane();
|
||||||
final Scene scene = new Scene(root);
|
final Scene scene = new Scene(root);
|
||||||
|
ViewStack.setup(scene);
|
||||||
|
|
||||||
stage.setTitle(AppContext.getString("appTitle"));
|
stage.setTitle(AppContext.getString("app-title"));
|
||||||
stage.setWidth(1080);
|
stage.setWidth(1080);
|
||||||
stage.setHeight(720);
|
stage.setHeight(720);
|
||||||
|
|
||||||
stage.setOnCloseRequest(event -> {
|
stage.setOnCloseRequest(event -> {
|
||||||
event.consume();
|
event.consume();
|
||||||
|
startQuit();
|
||||||
if (!isQuitting) {
|
|
||||||
quitPopup();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
@@ -57,78 +50,40 @@ public final class App extends Application {
|
|||||||
|
|
||||||
App.stage = stage;
|
App.stage = stage;
|
||||||
App.scene = scene;
|
App.scene = scene;
|
||||||
App.root = root;
|
|
||||||
|
|
||||||
App.stack = new Stack<>();
|
|
||||||
|
|
||||||
App.width = (int)stage.getWidth();
|
App.width = (int)stage.getWidth();
|
||||||
App.height = (int)stage.getHeight();
|
App.height = (int)stage.getHeight();
|
||||||
|
|
||||||
App.isQuitting = false;
|
App.isQuitting = false;
|
||||||
|
|
||||||
final AppSettings settings = new AppSettings();
|
AppSettings.applySettings();
|
||||||
settings.applySettings();
|
|
||||||
|
|
||||||
new EventFlow().addPostEvent(new AudioEvents.StartBackgroundMusic()).asyncPostEvent();
|
new EventFlow().addPostEvent(new AudioEvents.StartBackgroundMusic()).asyncPostEvent();
|
||||||
activate(new MainLayer());
|
|
||||||
|
ViewStack.push(new MainView());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void activate(Layer layer) {
|
public static void startQuit() {
|
||||||
Platform.runLater(() -> {
|
if (isQuitting) {
|
||||||
popAll();
|
return;
|
||||||
push(layer);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void push(Layer layer) {
|
ViewStack.push(new QuitView());
|
||||||
Platform.runLater(() -> {
|
|
||||||
root.getChildren().addLast(layer.getLayer());
|
|
||||||
stack.push(layer);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void pop() {
|
|
||||||
Platform.runLater(() -> {
|
|
||||||
root.getChildren().removeLast();
|
|
||||||
stack.pop();
|
|
||||||
|
|
||||||
isQuitting = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void popAll() {
|
|
||||||
Platform.runLater(() -> {
|
|
||||||
final int childrenCount = root.getChildren().size();
|
|
||||||
|
|
||||||
for (int i = 0; i < childrenCount; i++) {
|
|
||||||
try {
|
|
||||||
root.getChildren().removeLast();
|
|
||||||
} catch (Exception e) {
|
|
||||||
IO.println(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stack.removeAllElements();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void quitPopup() {
|
|
||||||
Platform.runLater(() -> {
|
|
||||||
push(new QuitPopup());
|
|
||||||
isQuitting = true;
|
isQuitting = true;
|
||||||
});
|
}
|
||||||
|
|
||||||
|
public static void stopQuit() {
|
||||||
|
ViewStack.pop();
|
||||||
|
isQuitting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void quit() {
|
public static void quit() {
|
||||||
|
ViewStack.cleanup();
|
||||||
stage.close();
|
stage.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void reloadAll() {
|
public static void reload() {
|
||||||
stage.setTitle(AppContext.getString("appTitle"));
|
stage.setTitle(AppContext.getString("app-title"));
|
||||||
|
ViewStack.reload();
|
||||||
for (final Layer layer : stack) {
|
|
||||||
layer.reload();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setFullscreen(boolean fullscreen) {
|
public static void setFullscreen(boolean fullscreen) {
|
||||||
@@ -137,7 +92,7 @@ public final class App extends Application {
|
|||||||
width = (int) stage.getWidth();
|
width = (int) stage.getWidth();
|
||||||
height = (int) stage.getHeight();
|
height = (int) stage.getHeight();
|
||||||
|
|
||||||
reloadAll();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setStyle(String theme, String layoutSize) {
|
public static void setStyle(String theme, String layoutSize) {
|
||||||
@@ -147,10 +102,11 @@ public final class App extends Application {
|
|||||||
scene.getStylesheets().removeLast();
|
scene.getStylesheets().removeLast();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scene.getStylesheets().add(ResourceManager.<CssAsset>get("general.css").getUrl());
|
||||||
scene.getStylesheets().add(ResourceManager.<CssAsset>get(theme + ".css").getUrl());
|
scene.getStylesheets().add(ResourceManager.<CssAsset>get(theme + ".css").getUrl());
|
||||||
scene.getStylesheets().add(ResourceManager.<CssAsset>get(layoutSize + ".css").getUrl());
|
scene.getStylesheets().add(ResourceManager.<CssAsset>get(layoutSize + ".css").getUrl());
|
||||||
|
|
||||||
reloadAll();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getWidth() {
|
public static int getWidth() {
|
||||||
|
|||||||
@@ -1,6 +1,41 @@
|
|||||||
package org.toop.app;
|
package org.toop.app;
|
||||||
|
|
||||||
public record GameInformation(String[] playerName, boolean[] isPlayerHuman,
|
public class GameInformation {
|
||||||
int[] computerDifficulty, int[] computerThinkTime,
|
public enum Type {
|
||||||
boolean isConnectionLocal, String serverIP, String serverPort) {
|
TICTACTOE,
|
||||||
|
REVERSI;
|
||||||
|
|
||||||
|
public static int playerCount(Type type) {
|
||||||
|
return switch (type) {
|
||||||
|
case TICTACTOE -> 2;
|
||||||
|
case REVERSI -> 2;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int maxDepth(Type type) {
|
||||||
|
return switch (type) {
|
||||||
|
case TICTACTOE -> 5;
|
||||||
|
case REVERSI -> 0; // Todo
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Player {
|
||||||
|
public String name = "";
|
||||||
|
public boolean isHuman = true;
|
||||||
|
public int computerDifficulty = 0;
|
||||||
|
public int computerThinkTime = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final Type type;
|
||||||
|
public final Player[] players;
|
||||||
|
|
||||||
|
public GameInformation(Type type) {
|
||||||
|
this.type = type;
|
||||||
|
players = new Player[Type.playerCount(type)];
|
||||||
|
|
||||||
|
for (int i = 0; i < players.length; i++) {
|
||||||
|
players[i] = new Player();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
188
app/src/main/java/org/toop/app/Server.java
Normal file
188
app/src/main/java/org/toop/app/Server.java
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
package org.toop.app;
|
||||||
|
|
||||||
|
import org.toop.app.game.TicTacToeGame;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
import org.toop.app.view.views.ChallengeView;
|
||||||
|
import org.toop.app.view.views.ErrorView;
|
||||||
|
import org.toop.app.view.views.SendChallengeView;
|
||||||
|
import org.toop.app.view.views.ServerView;
|
||||||
|
import org.toop.framework.eventbus.EventFlow;
|
||||||
|
import org.toop.framework.networking.events.NetworkEvents;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
|
public final class Server {
|
||||||
|
private String user = "";
|
||||||
|
|
||||||
|
private long clientId = -1;
|
||||||
|
private List<String> onlinePlayers = new CopyOnWriteArrayList<String>();
|
||||||
|
|
||||||
|
private ServerView view;
|
||||||
|
|
||||||
|
private boolean isPolling = true;
|
||||||
|
|
||||||
|
public static GameInformation.Type gameToType(String game) {
|
||||||
|
if (game.equalsIgnoreCase("tic-tac-toe")) {
|
||||||
|
return GameInformation.Type.TICTACTOE;
|
||||||
|
} else if (game.equalsIgnoreCase("reversi")) {
|
||||||
|
return GameInformation.Type.REVERSI;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Server(String ip, String port, String user) {
|
||||||
|
if (ip.split("\\.").length < 4) {
|
||||||
|
ViewStack.push(new ErrorView("\"" + ip + "\" " + AppContext.getString("is-not-a-valid-ip-address")));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int parsedPort = -1;
|
||||||
|
|
||||||
|
try {
|
||||||
|
parsedPort = Integer.parseInt(port);
|
||||||
|
} catch (NumberFormatException _) {
|
||||||
|
ViewStack.push(new ErrorView("\"" + port + "\" " + AppContext.getString("is-not-a-valid-port")));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.isEmpty()) {
|
||||||
|
ViewStack.push(new ErrorView(AppContext.getString("invalid-username")));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
new EventFlow()
|
||||||
|
.addPostEvent(NetworkEvents.StartClient.class, ip, parsedPort)
|
||||||
|
.onResponse(NetworkEvents.StartClientResponse.class, e -> {
|
||||||
|
this.user = user;
|
||||||
|
clientId = e.clientId();
|
||||||
|
|
||||||
|
new EventFlow().addPostEvent(new NetworkEvents.SendLogin(clientId, user)).postEvent();
|
||||||
|
|
||||||
|
view = new ServerView(user, this::sendChallenge, this::disconnect);
|
||||||
|
ViewStack.push(view);
|
||||||
|
|
||||||
|
startPopulateThread();
|
||||||
|
}).postEvent();
|
||||||
|
|
||||||
|
new EventFlow().listen(this::handleReceivedChallenge);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void populatePlayerList() {
|
||||||
|
new EventFlow().listen(NetworkEvents.PlayerlistResponse.class, e -> {
|
||||||
|
if (e.clientId() == clientId) {
|
||||||
|
onlinePlayers = new ArrayList<String>(List.of(e.playerlist()));
|
||||||
|
onlinePlayers.removeIf(name -> name.equalsIgnoreCase(user));
|
||||||
|
|
||||||
|
view.update(onlinePlayers);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
final EventFlow sendGetPlayerList = new EventFlow().addPostEvent(new NetworkEvents.SendGetPlayerlist(clientId));
|
||||||
|
|
||||||
|
while (isPolling) {
|
||||||
|
sendGetPlayerList.postEvent();
|
||||||
|
|
||||||
|
try {
|
||||||
|
Thread.sleep(5000);
|
||||||
|
} catch (InterruptedException _) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendChallenge(String opponent) {
|
||||||
|
ViewStack.push(new SendChallengeView(this, opponent, (playerInformation, gameType) -> {
|
||||||
|
new EventFlow().addPostEvent(new NetworkEvents.SendChallenge(clientId, opponent, gameType))
|
||||||
|
.listen(NetworkEvents.GameMatchResponse.class, e -> {
|
||||||
|
if (e.clientId() == clientId) {
|
||||||
|
isPolling = false;
|
||||||
|
onlinePlayers.clear();
|
||||||
|
|
||||||
|
final GameInformation.Type type = gameToType(gameType);
|
||||||
|
final int myTurn = e.playerToMove().equalsIgnoreCase(e.opponent())? 1 : 0;
|
||||||
|
|
||||||
|
final GameInformation information = new GameInformation(type);
|
||||||
|
information.players[0] = playerInformation;
|
||||||
|
information.players[0].name = user;
|
||||||
|
information.players[1].name = opponent;
|
||||||
|
|
||||||
|
new TicTacToeGame(information, myTurn, this::forfeitGame, this::exitGame);
|
||||||
|
}
|
||||||
|
}).postEvent();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleReceivedChallenge(NetworkEvents.ChallengeResponse response) {
|
||||||
|
String challengerName = response.challengerName();
|
||||||
|
challengerName = challengerName.substring(challengerName.indexOf("\"") + 1);
|
||||||
|
challengerName = challengerName.substring(0, challengerName.indexOf("\""));
|
||||||
|
|
||||||
|
String gameType = response.gameType();
|
||||||
|
gameType = gameType.substring(gameType.indexOf("\"") + 1);
|
||||||
|
gameType = gameType.substring(0, gameType.indexOf("\""));
|
||||||
|
|
||||||
|
final String finalGameType = gameType;
|
||||||
|
|
||||||
|
ViewStack.push(new ChallengeView(challengerName, gameType, (playerInformation) -> {
|
||||||
|
final int challengeId = Integer.parseInt(response.challengeId().substring(18, response.challengeId().length() - 2));
|
||||||
|
new EventFlow().addPostEvent(new NetworkEvents.SendAcceptChallenge(clientId, challengeId)).postEvent();
|
||||||
|
|
||||||
|
ViewStack.pop();
|
||||||
|
|
||||||
|
new EventFlow().listen(NetworkEvents.GameMatchResponse.class, e -> {
|
||||||
|
if (e.clientId() == clientId) {
|
||||||
|
isPolling = false;
|
||||||
|
onlinePlayers.clear();
|
||||||
|
|
||||||
|
final GameInformation.Type type = gameToType(finalGameType);
|
||||||
|
final int myTurn = e.playerToMove().equalsIgnoreCase(e.opponent())? 1 : 0;
|
||||||
|
|
||||||
|
final GameInformation information = new GameInformation(type);
|
||||||
|
information.players[0] = playerInformation;
|
||||||
|
information.players[0].name = user;
|
||||||
|
information.players[1].name = e.opponent();
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case TICTACTOE:
|
||||||
|
new TicTacToeGame(information, myTurn, this::forfeitGame, this::exitGame);
|
||||||
|
break;
|
||||||
|
case REVERSI:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void disconnect() {
|
||||||
|
// Todo
|
||||||
|
}
|
||||||
|
|
||||||
|
private void forfeitGame() {
|
||||||
|
// Todo
|
||||||
|
}
|
||||||
|
|
||||||
|
private void exitGame() {
|
||||||
|
forfeitGame();
|
||||||
|
|
||||||
|
ViewStack.push(view);
|
||||||
|
startPopulateThread();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startPopulateThread() {
|
||||||
|
isPolling = true;
|
||||||
|
|
||||||
|
final Thread populateThread = new Thread(this::populatePlayerList);
|
||||||
|
populateThread.setDaemon(false);
|
||||||
|
populateThread.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getGamesList() {
|
||||||
|
final List<String> list = new ArrayList<String>();
|
||||||
|
list.add("tic-tac-toe"); // Todo: get games list from server and check if the game is supported
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,8 +16,8 @@ public abstract class GameCanvas {
|
|||||||
|
|
||||||
protected final Color color;
|
protected final Color color;
|
||||||
|
|
||||||
protected int width;
|
protected final int width;
|
||||||
protected int height;
|
protected final int height;
|
||||||
|
|
||||||
protected final int rows;
|
protected final int rows;
|
||||||
protected final int columns;
|
protected final int columns;
|
||||||
@@ -28,6 +28,9 @@ public abstract class GameCanvas {
|
|||||||
protected final Cell[] cells;
|
protected final Cell[] cells;
|
||||||
|
|
||||||
protected GameCanvas(Color color, int width, int height, int rows, int columns, int gapSize, boolean edges, Consumer<Integer> onCellClicked) {
|
protected GameCanvas(Color color, int width, int height, int rows, int columns, int gapSize, boolean edges, Consumer<Integer> onCellClicked) {
|
||||||
|
width += gapSize * 2;
|
||||||
|
height += gapSize * 2;
|
||||||
|
|
||||||
canvas = new Canvas(width, height);
|
canvas = new Canvas(width, height);
|
||||||
graphics = canvas.getGraphicsContext2D();
|
graphics = canvas.getGraphicsContext2D();
|
||||||
|
|
||||||
@@ -44,14 +47,14 @@ public abstract class GameCanvas {
|
|||||||
|
|
||||||
cells = new Cell[rows * columns];
|
cells = new Cell[rows * columns];
|
||||||
|
|
||||||
final float cellWidth = ((float) width - (rows - 1) * gapSize) / rows;
|
final float cellWidth = ((float) width - gapSize * rows) / rows;
|
||||||
final float cellHeight = ((float) height - (columns - 1) * gapSize) / columns;
|
final float cellHeight = ((float) height - gapSize * columns) / columns;
|
||||||
|
|
||||||
for (int y = 0; y < columns; y++) {
|
for (int y = 0; y < columns; y++) {
|
||||||
final float startY = y * cellHeight + y * gapSize;
|
final float startY = gapSize + y * cellHeight + y * gapSize;
|
||||||
|
|
||||||
for (int x = 0; x < rows; x++) {
|
for (int x = 0; x < rows; x++) {
|
||||||
final float startX = x * cellWidth + x * gapSize;
|
final float startX = gapSize + x * cellWidth + x * gapSize;
|
||||||
cells[y * rows + x] = new Cell(startX, startY, cellWidth, cellHeight);
|
cells[y * rows + x] = new Cell(startX, startY, cellWidth, cellHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,11 +64,11 @@ public abstract class GameCanvas {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int column = (int) ((event.getX() / width) * rows);
|
final int column = (int)((event.getX() / this.width) * rows);
|
||||||
final int row = (int) ((event.getY() / height) * columns);
|
final int row = (int)((event.getY() / this.height) * columns);
|
||||||
|
|
||||||
event.consume();
|
event.consume();
|
||||||
onCellClicked.accept(row * rows + column);
|
onCellClicked.accept(column + row * rows);
|
||||||
});
|
});
|
||||||
|
|
||||||
render();
|
render();
|
||||||
@@ -79,44 +82,33 @@ public abstract class GameCanvas {
|
|||||||
graphics.setFill(color);
|
graphics.setFill(color);
|
||||||
|
|
||||||
for (int x = 1; x < rows; x++) {
|
for (int x = 1; x < rows; x++) {
|
||||||
graphics.fillRect(cells[x].x() - gapSize, 0, gapSize, height);
|
graphics.fillRect(cells[x].x() - gapSize, 0, gapSize, height + gapSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int y = 1; y < columns; y++) {
|
for (int y = 1; y < columns; y++) {
|
||||||
graphics.fillRect(0, cells[y * rows].y() - gapSize, width, gapSize);
|
graphics.fillRect(0, cells[y * rows].y() - gapSize, width + gapSize, gapSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (edges) {
|
if (edges) {
|
||||||
graphics.fillRect(-gapSize, 0, gapSize, height);
|
graphics.fillRect(0, 0, gapSize, height + gapSize);
|
||||||
graphics.fillRect(0, -gapSize, width, gapSize);
|
graphics.fillRect(0, 0, width + gapSize, gapSize);
|
||||||
|
|
||||||
graphics.fillRect(width - gapSize, 0, gapSize, height);
|
graphics.fillRect(width + gapSize, 0, gapSize, height + gapSize * 2);
|
||||||
graphics.fillRect(0, height - gapSize, width, gapSize);
|
graphics.fillRect(0, height + gapSize, width + gapSize * 2, gapSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(Color color, int cell) {
|
public void fill(Color color, int cell) {
|
||||||
final float x = cells[cell].x() + gapSize;
|
final float x = cells[cell].x();
|
||||||
final float y = cells[cell].y() + gapSize;
|
final float y = cells[cell].y();
|
||||||
|
|
||||||
final float width = cells[cell].width() - gapSize * 2;
|
final float width = cells[cell].width();
|
||||||
final float height = cells[cell].height() - gapSize * 2;
|
final float height = cells[cell].height();
|
||||||
|
|
||||||
graphics.setFill(color);
|
graphics.setFill(color);
|
||||||
graphics.fillRect(x, y, width, height);
|
graphics.fillRect(x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resize(int width, int height) {
|
|
||||||
canvas.setWidth(width);
|
|
||||||
canvas.setHeight(height);
|
|
||||||
|
|
||||||
this.width = width;
|
|
||||||
this.height = height;
|
|
||||||
|
|
||||||
clear();
|
|
||||||
render();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Canvas getCanvas() {
|
public Canvas getCanvas() {
|
||||||
return canvas;
|
return canvas;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import javafx.scene.paint.Color;
|
|||||||
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class TicTacToeCanvas extends GameCanvas {
|
public final class TicTacToeCanvas extends GameCanvas {
|
||||||
public TicTacToeCanvas(Color color, int width, int height, Consumer<Integer> onCellClicked) {
|
public TicTacToeCanvas(Color color, int width, int height, Consumer<Integer> onCellClicked) {
|
||||||
super(color, width, height, 3, 3, 10, false, onCellClicked);
|
super(color, width, height, 3, 3, 30, false, onCellClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawX(Color color, int cell) {
|
public void drawX(Color color, int cell) {
|
||||||
|
|||||||
220
app/src/main/java/org/toop/app/game/TicTacToeGame.java
Normal file
220
app/src/main/java/org/toop/app/game/TicTacToeGame.java
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
package org.toop.app.game;
|
||||||
|
|
||||||
|
import org.toop.app.App;
|
||||||
|
import org.toop.app.GameInformation;
|
||||||
|
import org.toop.app.canvas.TicTacToeCanvas;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
import org.toop.app.view.views.GameView;
|
||||||
|
import org.toop.app.view.views.LocalMultiplayerView;
|
||||||
|
import org.toop.framework.eventbus.EventFlow;
|
||||||
|
import org.toop.framework.networking.events.NetworkEvents;
|
||||||
|
import org.toop.game.Game;
|
||||||
|
import org.toop.game.tictactoe.TicTacToe;
|
||||||
|
import org.toop.game.tictactoe.TicTacToeAI;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.paint.Color;
|
||||||
|
|
||||||
|
import java.util.concurrent.BlockingQueue;
|
||||||
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
|
||||||
|
public final class TicTacToeGame {
|
||||||
|
private final GameInformation information;
|
||||||
|
|
||||||
|
private final int myTurn;
|
||||||
|
private final BlockingQueue<Game.Move> moveQueue;
|
||||||
|
|
||||||
|
private final TicTacToe game;
|
||||||
|
private final TicTacToeAI ai;
|
||||||
|
|
||||||
|
private final GameView view;
|
||||||
|
private final TicTacToeCanvas canvas;
|
||||||
|
|
||||||
|
public TicTacToeGame(GameInformation information, int myTurn, Runnable onForfeit, Runnable onExit) {
|
||||||
|
this.information = information;
|
||||||
|
|
||||||
|
this.myTurn = myTurn;
|
||||||
|
moveQueue = new LinkedBlockingQueue<Game.Move>();
|
||||||
|
|
||||||
|
game = new TicTacToe();
|
||||||
|
ai = new TicTacToeAI();
|
||||||
|
|
||||||
|
if (onForfeit == null || onExit == null) {
|
||||||
|
view = new GameView(null, () -> {
|
||||||
|
ViewStack.push(new LocalMultiplayerView(information));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
view = new GameView(onForfeit, onExit);
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas = new TicTacToeCanvas(Color.GRAY,
|
||||||
|
(App.getHeight() / 4) * 3, (App.getHeight() / 4) * 3,
|
||||||
|
(cell) -> {
|
||||||
|
if (onForfeit == null || onExit == null) {
|
||||||
|
if (information.players[game.getCurrentTurn()].isHuman) {
|
||||||
|
final char value = game.getCurrentTurn() == 0? 'X' : 'O';
|
||||||
|
|
||||||
|
try {
|
||||||
|
moveQueue.put(new Game.Move(cell, value));
|
||||||
|
} catch (InterruptedException _) {}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (information.players[0].isHuman) {
|
||||||
|
final char value = myTurn == 0? 'X' : 'O';
|
||||||
|
|
||||||
|
try {
|
||||||
|
moveQueue.put(new Game.Move(cell, value));
|
||||||
|
} catch (InterruptedException _) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
view.add(Pos.CENTER, canvas.getCanvas());
|
||||||
|
ViewStack.push(view);
|
||||||
|
|
||||||
|
if (onForfeit == null || onExit == null) {
|
||||||
|
new Thread(this::localGameThread).start();
|
||||||
|
} else {
|
||||||
|
new EventFlow()
|
||||||
|
.listen(NetworkEvents.GameMoveResponse.class, this::onMoveResponse)
|
||||||
|
.listen(NetworkEvents.YourTurnResponse.class, this::onYourTurnResponse)
|
||||||
|
.listen(NetworkEvents.ReceivedMessage.class, this::onReceivedMessage);
|
||||||
|
|
||||||
|
setGameLabels(myTurn == 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void localGameThread() {
|
||||||
|
boolean isRunning = true;
|
||||||
|
|
||||||
|
while (isRunning) {
|
||||||
|
final int currentTurn = game.getCurrentTurn();
|
||||||
|
final char currentValue = currentTurn == 0? 'X' : 'O';
|
||||||
|
final int nextTurn = (currentTurn + 1) % GameInformation.Type.playerCount(information.type);
|
||||||
|
|
||||||
|
view.nextPlayer(information.players[currentTurn].isHuman,
|
||||||
|
information.players[currentTurn].name,
|
||||||
|
String.valueOf(currentValue),
|
||||||
|
information.players[nextTurn].name);
|
||||||
|
|
||||||
|
Game.Move move = null;
|
||||||
|
|
||||||
|
if (information.players[currentTurn].isHuman) {
|
||||||
|
try {
|
||||||
|
final Game.Move wants = moveQueue.take();
|
||||||
|
final Game.Move[] legalMoves = game.getLegalMoves();
|
||||||
|
|
||||||
|
for (final Game.Move legalMove : legalMoves) {
|
||||||
|
if (legalMove.position() == wants.position() &&
|
||||||
|
legalMove.value() == wants.value()) {
|
||||||
|
move = wants;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (InterruptedException _) {}
|
||||||
|
} else {
|
||||||
|
final long start = System.currentTimeMillis();
|
||||||
|
|
||||||
|
move = ai.findBestMove(game, information.players[currentTurn].computerDifficulty);
|
||||||
|
|
||||||
|
if (information.players[currentTurn].computerThinkTime > 0) {
|
||||||
|
final long elapsedTime = System.currentTimeMillis() - start;
|
||||||
|
final long sleepTime = information.players[currentTurn].computerThinkTime * 1000L - elapsedTime;
|
||||||
|
|
||||||
|
try {
|
||||||
|
Thread.sleep((long)(sleepTime * Math.random()));
|
||||||
|
} catch (InterruptedException _) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (move == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Game.State state = game.play(move);
|
||||||
|
|
||||||
|
if (move.value() == 'X') {
|
||||||
|
canvas.drawX(Color.INDIANRED, move.position());
|
||||||
|
} else if (move.value() == 'O') {
|
||||||
|
canvas.drawO(Color.ROYALBLUE, move.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state != Game.State.NORMAL) {
|
||||||
|
if (state == Game.State.WIN) {
|
||||||
|
view.gameOver(true, information.players[currentTurn].name);
|
||||||
|
} else if (state == Game.State.DRAW) {
|
||||||
|
view.gameOver(false, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
isRunning = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onMoveResponse(NetworkEvents.GameMoveResponse response) {
|
||||||
|
char playerChar;
|
||||||
|
|
||||||
|
if (response.player().equalsIgnoreCase(information.players[0].name)) {
|
||||||
|
playerChar = myTurn == 0? 'X' : 'O';
|
||||||
|
} else {
|
||||||
|
playerChar = myTurn == 0? 'O' : 'X';
|
||||||
|
}
|
||||||
|
|
||||||
|
final Game.Move move = new Game.Move(Integer.parseInt(response.move()), playerChar);
|
||||||
|
final Game.State state = game.play(move);
|
||||||
|
|
||||||
|
if (state != Game.State.NORMAL) {
|
||||||
|
if (state == Game.State.WIN) {
|
||||||
|
if (response.player().equalsIgnoreCase(information.players[0].name)) {
|
||||||
|
view.gameOver(true, information.players[0].name);
|
||||||
|
} else {
|
||||||
|
view.gameOver(false, information.players[1].name);
|
||||||
|
}
|
||||||
|
} else if (state == Game.State.DRAW) {
|
||||||
|
view.gameOver(false, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (move.value() == 'X') {
|
||||||
|
canvas.drawX(Color.RED, move.position());
|
||||||
|
} else if (move.value() == 'O') {
|
||||||
|
canvas.drawO(Color.BLUE, move.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
setGameLabels(game.getCurrentTurn() == myTurn);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onYourTurnResponse(NetworkEvents.YourTurnResponse response) {
|
||||||
|
moveQueue.clear();
|
||||||
|
|
||||||
|
int position = -1;
|
||||||
|
|
||||||
|
if (information.players[0].isHuman) {
|
||||||
|
try {
|
||||||
|
position = moveQueue.take().position();
|
||||||
|
} catch (InterruptedException _) {}
|
||||||
|
} else {
|
||||||
|
final Game.Move move = ai.findBestMove(game, information.players[0].computerDifficulty);
|
||||||
|
|
||||||
|
assert move != null;
|
||||||
|
position = move.position();
|
||||||
|
}
|
||||||
|
|
||||||
|
new EventFlow().addPostEvent(new NetworkEvents.SendMove(response.clientId(), (short)position))
|
||||||
|
.postEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onReceivedMessage(NetworkEvents.ReceivedMessage msg) {
|
||||||
|
view.updateChat("anon", msg.message());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setGameLabels(boolean isMe) {
|
||||||
|
final int currentTurn = game.getCurrentTurn();
|
||||||
|
final char currentValue = currentTurn == 0? 'X' : 'O';
|
||||||
|
|
||||||
|
view.nextPlayer(isMe,
|
||||||
|
information.players[isMe? 0 : 1].name,
|
||||||
|
String.valueOf(currentValue),
|
||||||
|
information.players[isMe? 1 : 0].name);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package org.toop.app.layer;
|
|
||||||
|
|
||||||
import javafx.scene.Node;
|
|
||||||
import javafx.scene.layout.Region;
|
|
||||||
|
|
||||||
public abstract class Container {
|
|
||||||
public abstract Region getContainer();
|
|
||||||
|
|
||||||
public abstract void addNodes(Node... nodes);
|
|
||||||
public abstract void addContainer(Container container, boolean fill);
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
package org.toop.app.layer;
|
|
||||||
|
|
||||||
import org.toop.app.App;
|
|
||||||
import org.toop.app.canvas.GameCanvas;
|
|
||||||
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
import javafx.scene.layout.Region;
|
|
||||||
import javafx.scene.layout.StackPane;
|
|
||||||
|
|
||||||
public abstract class Layer {
|
|
||||||
protected StackPane layer;
|
|
||||||
protected Region background;
|
|
||||||
|
|
||||||
protected Layer(String... backgroundStyles) {
|
|
||||||
layer = new StackPane();
|
|
||||||
|
|
||||||
background = new Region();
|
|
||||||
background.getStyleClass().addAll(backgroundStyles);
|
|
||||||
background.setPrefSize(Double.MAX_VALUE, Double.MAX_VALUE);
|
|
||||||
|
|
||||||
layer.getChildren().addLast(background);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void addContainer(Container container, Pos position, int xOffset, int yOffset, int widthPercent, int heightPercent) {
|
|
||||||
StackPane.setAlignment(container.getContainer(), position);
|
|
||||||
|
|
||||||
final double widthUnit = App.getWidth() / 100.0;
|
|
||||||
final double heightUnit = App.getHeight() / 100.0;
|
|
||||||
|
|
||||||
if (widthPercent > 0) {
|
|
||||||
container.getContainer().setMaxWidth(widthPercent * widthUnit);
|
|
||||||
} else {
|
|
||||||
container.getContainer().setMaxWidth(Region.USE_PREF_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (heightPercent > 0) {
|
|
||||||
container.getContainer().setMaxHeight(heightPercent * heightUnit);
|
|
||||||
} else {
|
|
||||||
container.getContainer().setMaxHeight(Region.USE_PREF_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
container.getContainer().setTranslateX(xOffset * widthUnit);
|
|
||||||
container.getContainer().setTranslateY(yOffset * heightUnit);
|
|
||||||
|
|
||||||
layer.getChildren().addLast(container.getContainer());
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void addGameCanvas(GameCanvas canvas, Pos position, int xOffset, int yOffset) {
|
|
||||||
StackPane.setAlignment(canvas.getCanvas(), position);
|
|
||||||
|
|
||||||
final double widthUnit = App.getWidth() / 100.0;
|
|
||||||
final double heightUnit = App.getHeight() / 100.0;
|
|
||||||
|
|
||||||
canvas.getCanvas().setTranslateX(xOffset * widthUnit);
|
|
||||||
canvas.getCanvas().setTranslateY(yOffset * heightUnit);
|
|
||||||
|
|
||||||
layer.getChildren().addLast(canvas.getCanvas());
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void pop() {
|
|
||||||
if (layer.getChildren().size() <= 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
layer.getChildren().removeLast();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void popAll() {
|
|
||||||
final int containers = layer.getChildren().size();
|
|
||||||
|
|
||||||
for (int i = 1; i < containers; i++) {
|
|
||||||
layer.getChildren().removeLast();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public StackPane getLayer() {
|
|
||||||
return layer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void reload();
|
|
||||||
}
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
package org.toop.app.layer;
|
|
||||||
|
|
||||||
import org.toop.framework.audio.events.AudioEvents;
|
|
||||||
import org.toop.framework.eventbus.EventFlow;
|
|
||||||
|
|
||||||
import javafx.beans.property.BooleanProperty;
|
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
|
||||||
import javafx.geometry.Orientation;
|
|
||||||
import javafx.scene.Node;
|
|
||||||
import javafx.scene.control.*;
|
|
||||||
import javafx.scene.text.Text;
|
|
||||||
|
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
public final class NodeBuilder {
|
|
||||||
public static void addCss(Node node, String... cssClasses) {
|
|
||||||
node.getStyleClass().addAll(cssClasses);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setCss(Node node, String... cssClasses) {
|
|
||||||
node.getStyleClass().removeAll();
|
|
||||||
node.getStyleClass().addAll(cssClasses);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Text header(String x) {
|
|
||||||
final Text element = new Text(x);
|
|
||||||
setCss(element, "text-primary", "text-header");
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Text text(String x) {
|
|
||||||
final Text element = new Text(x);
|
|
||||||
setCss(element, "text-secondary", "text-normal");
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Label button(String x, Runnable runnable) {
|
|
||||||
final Label element = new Label(x);
|
|
||||||
setCss(element, "button", "text-normal");
|
|
||||||
|
|
||||||
element.setOnMouseClicked(_ -> {
|
|
||||||
new EventFlow().addPostEvent(new AudioEvents.ClickButton()).asyncPostEvent();
|
|
||||||
runnable.run();
|
|
||||||
});
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Label toggle(String x1, String x2, boolean toggled, Consumer<Boolean> consumer) {
|
|
||||||
final Label element = new Label(toggled ? x2 : x1);
|
|
||||||
setCss(element, "toggle", "text-normal");
|
|
||||||
|
|
||||||
final BooleanProperty checked = new SimpleBooleanProperty(toggled);
|
|
||||||
|
|
||||||
element.setOnMouseClicked(_ -> {
|
|
||||||
new EventFlow().addPostEvent(new AudioEvents.ClickButton()).asyncPostEvent();
|
|
||||||
checked.set(!checked.get());
|
|
||||||
|
|
||||||
if (checked.get()) {
|
|
||||||
element.setText(x1);
|
|
||||||
} else {
|
|
||||||
element.setText(x2);
|
|
||||||
}
|
|
||||||
|
|
||||||
consumer.accept(checked.get());
|
|
||||||
});
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Slider slider(int max, int initial, Consumer<Integer> consumer) {
|
|
||||||
final Slider element = new Slider(0, max, initial);
|
|
||||||
setCss(element, "bg-slider-track");
|
|
||||||
|
|
||||||
element.setMinorTickCount(0);
|
|
||||||
element.setMajorTickUnit(1);
|
|
||||||
element.setBlockIncrement(1);
|
|
||||||
|
|
||||||
element.setSnapToTicks(true);
|
|
||||||
element.setShowTickLabels(true);
|
|
||||||
|
|
||||||
element.setOnMouseClicked(_ -> {
|
|
||||||
new EventFlow().addPostEvent(new AudioEvents.ClickButton()).asyncPostEvent();
|
|
||||||
});
|
|
||||||
|
|
||||||
element.valueProperty().addListener((_, _, newValue) -> {
|
|
||||||
consumer.accept(newValue.intValue());
|
|
||||||
});
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static TextField input(String x, Consumer<String> consumer) {
|
|
||||||
final TextField element = new TextField(x);
|
|
||||||
setCss(element, "input", "text-normal");
|
|
||||||
|
|
||||||
element.setOnMouseClicked(_ -> {
|
|
||||||
new EventFlow().addPostEvent(new AudioEvents.ClickButton()).asyncPostEvent();
|
|
||||||
});
|
|
||||||
|
|
||||||
element.textProperty().addListener((_, _, newValue) -> {
|
|
||||||
consumer.accept(newValue);
|
|
||||||
});
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T> ChoiceBox<T> choiceBox(Consumer<T> consumer) {
|
|
||||||
final ChoiceBox<T> element = new ChoiceBox<>();
|
|
||||||
setCss(element, "choice-box", "text-normal");
|
|
||||||
|
|
||||||
element.setOnMouseClicked(_ -> {
|
|
||||||
new EventFlow().addPostEvent(new AudioEvents.ClickButton()).asyncPostEvent();
|
|
||||||
});
|
|
||||||
|
|
||||||
element.valueProperty().addListener((_, _, newValue) -> {
|
|
||||||
consumer.accept(newValue);
|
|
||||||
});
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Separator separator() {
|
|
||||||
final Separator element = new Separator(Orientation.HORIZONTAL);
|
|
||||||
setCss(element, "separator");
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package org.toop.app.layer;
|
|
||||||
|
|
||||||
import org.toop.app.App;
|
|
||||||
|
|
||||||
public abstract class Popup extends Layer {
|
|
||||||
protected Popup(boolean popOnBackground, String... backgroundStyles) {
|
|
||||||
super(backgroundStyles);
|
|
||||||
|
|
||||||
if (popOnBackground) {
|
|
||||||
background.setOnMouseClicked(_ -> {
|
|
||||||
App.pop();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Popup(boolean popOnBackground) {
|
|
||||||
this(popOnBackground, "bg-popup");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
package org.toop.app.layer.containers;
|
|
||||||
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
|
|
||||||
import javafx.collections.ObservableList;
|
|
||||||
import javafx.scene.Node;
|
|
||||||
import javafx.scene.layout.HBox;
|
|
||||||
import javafx.scene.layout.Priority;
|
|
||||||
import javafx.scene.layout.Region;
|
|
||||||
|
|
||||||
public final class HorizontalContainer extends Container {
|
|
||||||
private final HBox container;
|
|
||||||
|
|
||||||
public HorizontalContainer(int spacing, String... cssClasses) {
|
|
||||||
container = new HBox(spacing);
|
|
||||||
container.getStyleClass().addAll(cssClasses);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HorizontalContainer(int spacing) {
|
|
||||||
this(spacing, "container");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Region getContainer() {
|
|
||||||
return container;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addNodes(Node... nodes) {
|
|
||||||
container.getChildren().addAll(nodes);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addContainer(Container container, boolean fill) {
|
|
||||||
if (fill) {
|
|
||||||
container.getContainer().setMinSize(0, 0);
|
|
||||||
container.getContainer().setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
|
|
||||||
HBox.setHgrow(container.getContainer(), Priority.ALWAYS);
|
|
||||||
} else {
|
|
||||||
container.getContainer().setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.container.getChildren().add(container.getContainer());
|
|
||||||
|
|
||||||
if (fill) {
|
|
||||||
balanceChildWidths();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void balanceChildWidths() {
|
|
||||||
final ObservableList<Node> children = container.getChildren();
|
|
||||||
final double widthPerChild = container.getWidth() / children.size();
|
|
||||||
|
|
||||||
for (final Node child : children) {
|
|
||||||
if (child instanceof Region) {
|
|
||||||
((Region) child).setPrefWidth(widthPerChild);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
package org.toop.app.layer.containers;
|
|
||||||
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
|
|
||||||
import javafx.collections.ObservableList;
|
|
||||||
import javafx.scene.Node;
|
|
||||||
import javafx.scene.layout.Priority;
|
|
||||||
import javafx.scene.layout.Region;
|
|
||||||
import javafx.scene.layout.VBox;
|
|
||||||
|
|
||||||
public final class VerticalContainer extends Container {
|
|
||||||
private final VBox container;
|
|
||||||
|
|
||||||
public VerticalContainer(int spacing, String... cssClasses) {
|
|
||||||
container = new VBox(spacing);
|
|
||||||
container.getStyleClass().addAll(cssClasses);
|
|
||||||
}
|
|
||||||
|
|
||||||
public VerticalContainer(int spacing) {
|
|
||||||
this(spacing, "container");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Region getContainer() {
|
|
||||||
return container;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addNodes(Node... nodes) {
|
|
||||||
container.getChildren().addAll(nodes);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addContainer(Container container, boolean fill) {
|
|
||||||
if (fill) {
|
|
||||||
container.getContainer().setMinSize(0, 0);
|
|
||||||
container.getContainer().setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
|
|
||||||
VBox.setVgrow(container.getContainer(), Priority.ALWAYS);
|
|
||||||
} else {
|
|
||||||
container.getContainer().setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.container.getChildren().add(container.getContainer());
|
|
||||||
|
|
||||||
if (fill) {
|
|
||||||
balanceChildHeights();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void balanceChildHeights() {
|
|
||||||
final ObservableList<Node> children = container.getChildren();
|
|
||||||
final double heightPerChild = container.getHeight() / children.size();
|
|
||||||
|
|
||||||
for (final Node child : children) {
|
|
||||||
if (child instanceof Region) {
|
|
||||||
((Region) child).setPrefHeight(heightPerChild);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
package org.toop.app.layer.layers;
|
|
||||||
|
|
||||||
import javafx.application.Platform;
|
|
||||||
import org.toop.app.App;
|
|
||||||
import org.toop.app.GameInformation;
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
import org.toop.app.layer.Layer;
|
|
||||||
import org.toop.app.layer.NodeBuilder;
|
|
||||||
import org.toop.app.layer.Popup;
|
|
||||||
import org.toop.app.layer.containers.HorizontalContainer;
|
|
||||||
import org.toop.app.layer.containers.VerticalContainer;
|
|
||||||
import org.toop.app.layer.layers.game.TicTacToeLayer;
|
|
||||||
import org.toop.framework.eventbus.EventFlow;
|
|
||||||
import org.toop.framework.networking.events.NetworkEvents;
|
|
||||||
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
import javafx.scene.control.Label;
|
|
||||||
import javafx.scene.control.ListView;
|
|
||||||
import org.toop.local.AppContext;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Timer;
|
|
||||||
import java.util.TimerTask;
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
|
|
||||||
public final class ConnectedLayer extends Layer {
|
|
||||||
private static Timer pollTimer = new Timer();
|
|
||||||
|
|
||||||
private static class ChallengePopup extends Popup {
|
|
||||||
private final GameInformation information;
|
|
||||||
|
|
||||||
private final String challenger;
|
|
||||||
private final String game;
|
|
||||||
|
|
||||||
private final long clientID;
|
|
||||||
private final int challengeID;
|
|
||||||
|
|
||||||
public ChallengePopup(GameInformation information, String challenger, String game, long clientID, String challengeID) {
|
|
||||||
super(false, "bg-popup");
|
|
||||||
|
|
||||||
this.information = information;
|
|
||||||
|
|
||||||
this.challenger = challenger;
|
|
||||||
this.game = game;
|
|
||||||
|
|
||||||
this.clientID = clientID;
|
|
||||||
this.challengeID = Integer.parseInt(challengeID.substring(18, challengeID.length() - 2));
|
|
||||||
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
popAll();
|
|
||||||
|
|
||||||
final var challengeText = NodeBuilder.header(AppContext.getString("challengeText"));
|
|
||||||
final var challengerNameText = NodeBuilder.header(challenger);
|
|
||||||
|
|
||||||
final var gameText = NodeBuilder.text(AppContext.getString("gameIsText"));
|
|
||||||
final var gameNameText = NodeBuilder.text(game);
|
|
||||||
|
|
||||||
final var acceptButton = NodeBuilder.button(AppContext.getString("accept"), () -> {
|
|
||||||
pollTimer.cancel();
|
|
||||||
|
|
||||||
new EventFlow().addPostEvent(new NetworkEvents.SendAcceptChallenge(clientID, challengeID)).postEvent();
|
|
||||||
App.activate(new TicTacToeLayer(information, clientID));
|
|
||||||
});
|
|
||||||
|
|
||||||
final var denyButton = NodeBuilder.button(AppContext.getString("deny"), () -> {
|
|
||||||
App.pop();
|
|
||||||
});
|
|
||||||
|
|
||||||
final Container controlContainer = new HorizontalContainer(30);
|
|
||||||
controlContainer.addNodes(acceptButton, denyButton);
|
|
||||||
|
|
||||||
final Container mainContainer = new VerticalContainer(30);
|
|
||||||
mainContainer.addNodes(challengeText, challengerNameText);
|
|
||||||
mainContainer.addNodes(gameText, gameNameText);
|
|
||||||
|
|
||||||
mainContainer.addContainer(controlContainer, false);
|
|
||||||
|
|
||||||
addContainer(mainContainer, Pos.CENTER, 0, 0, 30, 30);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GameInformation information;
|
|
||||||
long clientId;
|
|
||||||
String user;
|
|
||||||
List<String> onlinePlayers = new CopyOnWriteArrayList<>();
|
|
||||||
|
|
||||||
public ConnectedLayer(GameInformation information) {
|
|
||||||
super("bg-primary");
|
|
||||||
|
|
||||||
this.information = information;
|
|
||||||
|
|
||||||
new EventFlow()
|
|
||||||
.addPostEvent(NetworkEvents.StartClient.class, information.serverIP(), Integer.parseInt(information.serverPort()))
|
|
||||||
.onResponse(NetworkEvents.StartClientResponse.class, e -> {
|
|
||||||
clientId = e.clientId();
|
|
||||||
user = information.playerName()[0].replaceAll("\\s+", "");
|
|
||||||
|
|
||||||
new EventFlow().addPostEvent(new NetworkEvents.SendLogin(this.clientId, this.user)).postEvent();
|
|
||||||
|
|
||||||
Thread popThread = new Thread(this::populatePlayerList);
|
|
||||||
popThread.setDaemon(false);
|
|
||||||
popThread.start();
|
|
||||||
}).postEvent();
|
|
||||||
|
|
||||||
new EventFlow().listen(this::handleReceivedChallenge);
|
|
||||||
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void populatePlayerList() {
|
|
||||||
EventFlow sendGetPlayerList = new EventFlow().addPostEvent(new NetworkEvents.SendGetPlayerlist(this.clientId));
|
|
||||||
new EventFlow().listen(NetworkEvents.PlayerlistResponse.class, e -> {
|
|
||||||
if (e.clientId() == this.clientId) {
|
|
||||||
List<String> playerList = new java.util.ArrayList<>(List.of(e.playerlist())); // TODO: Garbage, but works
|
|
||||||
playerList.removeIf(name -> name.equalsIgnoreCase(user));
|
|
||||||
if (this.onlinePlayers != playerList) {
|
|
||||||
this.onlinePlayers.clear();
|
|
||||||
this.onlinePlayers.addAll(playerList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
TimerTask task = new TimerTask() {
|
|
||||||
public void run() {
|
|
||||||
sendGetPlayerList.postEvent();
|
|
||||||
Platform.runLater(() -> reload());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
pollTimer.schedule(task, 0L, 5000L); // TODO: Block app exit, fix later
|
|
||||||
}
|
|
||||||
|
|
||||||
private void sendChallenge(String oppUsername, String gameType) {
|
|
||||||
final AtomicInteger challengeId = new AtomicInteger(-1);
|
|
||||||
|
|
||||||
if (onlinePlayers.contains(oppUsername)) {
|
|
||||||
new EventFlow().addPostEvent(new NetworkEvents.SendChallenge(this.clientId, oppUsername, gameType))
|
|
||||||
.listen(NetworkEvents.ChallengeResponse.class, e -> {
|
|
||||||
challengeId.set(Integer.parseInt(e.challengeId().substring(18, e.challengeId().length() - 2)));
|
|
||||||
})
|
|
||||||
.listen(NetworkEvents.GameMatchResponse.class, e -> {
|
|
||||||
if (e.clientId() == this.clientId) {
|
|
||||||
pollTimer.cancel();
|
|
||||||
App.activate(new TicTacToeLayer(information, this.clientId, e));
|
|
||||||
}
|
|
||||||
}, false).postEvent();
|
|
||||||
// ^
|
|
||||||
// |
|
|
||||||
// |
|
|
||||||
// |
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleReceivedChallenge(NetworkEvents.ChallengeResponse response) {
|
|
||||||
App.push(new ChallengePopup(information, response.challengerName(), response.gameType(), clientId, response.challengeId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
popAll();
|
|
||||||
|
|
||||||
ListView<Label> players = new ListView<>();
|
|
||||||
|
|
||||||
for (int i = 0; i < onlinePlayers.size(); i++) {
|
|
||||||
int finalI = i;
|
|
||||||
players.getItems().add(NodeBuilder.button(onlinePlayers.get(i), () -> {
|
|
||||||
String clickedPlayer = onlinePlayers.get(finalI);
|
|
||||||
sendChallenge(clickedPlayer, "tic-tac-toe");
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
final Container playersContainer = new VerticalContainer(10);
|
|
||||||
playersContainer.addNodes(players);
|
|
||||||
|
|
||||||
addContainer(playersContainer, Pos.CENTER, 0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
package org.toop.app.layer.layers;
|
|
||||||
|
|
||||||
import org.toop.app.App;
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
import org.toop.app.layer.NodeBuilder;
|
|
||||||
import org.toop.app.layer.Popup;
|
|
||||||
import org.toop.app.layer.containers.HorizontalContainer;
|
|
||||||
import org.toop.app.layer.containers.VerticalContainer;
|
|
||||||
import org.toop.local.AppContext;
|
|
||||||
|
|
||||||
import javafx.animation.PauseTransition;
|
|
||||||
import javafx.animation.TranslateTransition;
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
import javafx.scene.text.Text;
|
|
||||||
import javafx.util.Duration;
|
|
||||||
|
|
||||||
public final class CreditsPopup extends Popup {
|
|
||||||
private final int lineHeight = 100;
|
|
||||||
|
|
||||||
public CreditsPopup() {
|
|
||||||
super(true, "bg-primary");
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
popAll();
|
|
||||||
|
|
||||||
final String[] credits = {
|
|
||||||
AppContext.getString("scrumMaster") + ": Stef",
|
|
||||||
AppContext.getString("productOwner") + ": Omar",
|
|
||||||
AppContext.getString("mergeCommander") + ": Bas",
|
|
||||||
AppContext.getString("localization") + ": Ticho",
|
|
||||||
AppContext.getString("ai") + ": Michiel",
|
|
||||||
AppContext.getString("developers") + ": Michiel, Bas, Stef, Omar, Ticho",
|
|
||||||
AppContext.getString("moralSupport") + ": Wesley",
|
|
||||||
AppContext.getString("opengl") + ": Omar"
|
|
||||||
};
|
|
||||||
|
|
||||||
final Text[] creditsHeaders = new Text[credits.length];
|
|
||||||
|
|
||||||
for (int i = 0; i < credits.length; i++) {
|
|
||||||
creditsHeaders[i] = NodeBuilder.header(credits[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
final Container creditsContainer = new HorizontalContainer(0);
|
|
||||||
|
|
||||||
final Container animatedContainer = new VerticalContainer(lineHeight);
|
|
||||||
creditsContainer.addContainer(animatedContainer, true);
|
|
||||||
|
|
||||||
animatedContainer.addNodes(creditsHeaders);
|
|
||||||
addContainer(creditsContainer, Pos.CENTER, 0, 0, 50, 100);
|
|
||||||
|
|
||||||
playCredits(animatedContainer, App.getHeight());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void playCredits(Container container, double sceneLength) {
|
|
||||||
container.getContainer().setTranslateY(-sceneLength);
|
|
||||||
|
|
||||||
final TranslateTransition scrollCredits = new TranslateTransition(Duration.seconds(20), container.getContainer());
|
|
||||||
scrollCredits.setFromY(-sceneLength - lineHeight);
|
|
||||||
scrollCredits.setToY(sceneLength + lineHeight);
|
|
||||||
|
|
||||||
scrollCredits.setOnFinished(_ -> {
|
|
||||||
final PauseTransition pauseCredits = new PauseTransition(Duration.seconds(3));
|
|
||||||
pauseCredits.setOnFinished(_ -> playCredits(container, sceneLength));
|
|
||||||
pauseCredits.play();
|
|
||||||
});
|
|
||||||
|
|
||||||
scrollCredits.play();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
package org.toop.app.layer.layers;
|
|
||||||
|
|
||||||
import org.toop.app.App;
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
import org.toop.app.layer.Layer;
|
|
||||||
import org.toop.app.layer.NodeBuilder;
|
|
||||||
import org.toop.app.layer.containers.VerticalContainer;
|
|
||||||
import org.toop.local.AppContext;
|
|
||||||
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
|
|
||||||
public final class MainLayer extends Layer {
|
|
||||||
public MainLayer() {
|
|
||||||
super("bg-primary");
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
popAll();
|
|
||||||
|
|
||||||
final var tictactoeButton = NodeBuilder.button(AppContext.getString("tictactoe"), () -> {
|
|
||||||
App.activate(new MultiplayerLayer());
|
|
||||||
});
|
|
||||||
|
|
||||||
final var othelloButton = NodeBuilder.button(AppContext.getString("othello"), () -> {
|
|
||||||
App.activate(new MultiplayerLayer());
|
|
||||||
});
|
|
||||||
|
|
||||||
final var creditsButton = NodeBuilder.button(AppContext.getString("credits"), () -> {
|
|
||||||
App.push(new CreditsPopup());
|
|
||||||
});
|
|
||||||
|
|
||||||
final var optionsButton = NodeBuilder.button(AppContext.getString("options"), () -> {
|
|
||||||
App.push(new OptionsPopup());
|
|
||||||
});
|
|
||||||
|
|
||||||
final var quitButton = NodeBuilder.button(AppContext.getString("quit"), () -> {
|
|
||||||
App.quitPopup();
|
|
||||||
});
|
|
||||||
|
|
||||||
final Container gamesContainer = new VerticalContainer(5);
|
|
||||||
gamesContainer.addNodes(tictactoeButton, othelloButton);
|
|
||||||
|
|
||||||
final Container controlContainer = new VerticalContainer(5);
|
|
||||||
controlContainer.addNodes(creditsButton, optionsButton, quitButton);
|
|
||||||
|
|
||||||
addContainer(gamesContainer, Pos.TOP_LEFT, 2, 2, 20, 0);
|
|
||||||
addContainer(controlContainer, Pos.BOTTOM_LEFT, 2, -2, 20, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,176 +0,0 @@
|
|||||||
package org.toop.app.layer.layers;
|
|
||||||
|
|
||||||
import org.toop.app.App;
|
|
||||||
import org.toop.app.GameInformation;
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
import org.toop.app.layer.Layer;
|
|
||||||
import org.toop.app.layer.NodeBuilder;
|
|
||||||
import org.toop.app.layer.containers.HorizontalContainer;
|
|
||||||
import org.toop.app.layer.containers.VerticalContainer;
|
|
||||||
import org.toop.app.layer.layers.game.TicTacToeLayer;
|
|
||||||
import org.toop.local.AppContext;
|
|
||||||
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
public final class MultiplayerLayer extends Layer {
|
|
||||||
private boolean isConnectionLocal = true;
|
|
||||||
|
|
||||||
private boolean isPlayer1Human = true;
|
|
||||||
private String player1Name = "";
|
|
||||||
private int computer1Difficulty = 0;
|
|
||||||
private int computer1ThinkTime = 0;
|
|
||||||
|
|
||||||
private boolean isPlayer2Human = true;
|
|
||||||
private String player2Name = "";
|
|
||||||
private int computer2Difficulty = 0;
|
|
||||||
private int computer2ThinkTime = 0;
|
|
||||||
|
|
||||||
private String serverIP = "";
|
|
||||||
private String serverPort = "";
|
|
||||||
|
|
||||||
public MultiplayerLayer() {
|
|
||||||
super("bg-primary");
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
popAll();
|
|
||||||
|
|
||||||
final Container player1Container = new VerticalContainer(20);
|
|
||||||
final Container player2Container = new VerticalContainer(20);
|
|
||||||
|
|
||||||
final var isPlayer1HumanToggle = NodeBuilder.toggle(AppContext.getString("human"), AppContext.getString("computer"), !isPlayer1Human, (computer) -> {
|
|
||||||
isPlayer1Human = !computer;
|
|
||||||
reload();
|
|
||||||
});
|
|
||||||
|
|
||||||
player1Container.addNodes(isPlayer1HumanToggle);
|
|
||||||
|
|
||||||
if (isPlayer1Human) {
|
|
||||||
final var playerNameText = NodeBuilder.text(AppContext.getString("playerName"));
|
|
||||||
final var playerNameInput = NodeBuilder.input(player1Name, (name) -> {
|
|
||||||
player1Name = name;
|
|
||||||
});
|
|
||||||
|
|
||||||
player1Container.addNodes(playerNameText, playerNameInput);
|
|
||||||
} else {
|
|
||||||
player1Name = "Pism Bot V" + LocalDateTime.now().getSecond();
|
|
||||||
|
|
||||||
final var computerNameText = NodeBuilder.text(player1Name);
|
|
||||||
final var computerNameSeparator = NodeBuilder.separator();
|
|
||||||
|
|
||||||
final var computerDifficultyText = NodeBuilder.text(AppContext.getString("computerDifficulty"));
|
|
||||||
final var computerDifficultySeparator = NodeBuilder.separator();
|
|
||||||
final var computerDifficultySlider = NodeBuilder.slider(10, computer1Difficulty, (difficulty) ->
|
|
||||||
computer1Difficulty = difficulty);
|
|
||||||
|
|
||||||
final var computerThinkTimeText = NodeBuilder.text(AppContext.getString("computerThinkTime"));
|
|
||||||
final var computerThinkTimeSlider = NodeBuilder.slider(5, computer1ThinkTime, (thinkTime) ->
|
|
||||||
computer1ThinkTime = thinkTime);
|
|
||||||
|
|
||||||
player1Container.addNodes(computerNameText, computerNameSeparator,
|
|
||||||
computerDifficultyText, computerDifficultySlider, computerDifficultySeparator,
|
|
||||||
computerThinkTimeText, computerThinkTimeSlider);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isConnectionLocal) {
|
|
||||||
final var isPlayer2HumanToggle = NodeBuilder.toggle(AppContext.getString("human"), AppContext.getString("computer"), !isPlayer2Human, (computer) -> {
|
|
||||||
isPlayer2Human = !computer;
|
|
||||||
reload();
|
|
||||||
});
|
|
||||||
|
|
||||||
player2Container.addNodes(isPlayer2HumanToggle);
|
|
||||||
|
|
||||||
if (isPlayer2Human) {
|
|
||||||
final var playerNameText = NodeBuilder.text(AppContext.getString("playerName"));
|
|
||||||
final var playerNameInput = NodeBuilder.input(player2Name, (name) -> {
|
|
||||||
player2Name = name;
|
|
||||||
});
|
|
||||||
|
|
||||||
player2Container.addNodes(playerNameText, playerNameInput);
|
|
||||||
} else {
|
|
||||||
player2Name = "Pism Bot V" + LocalDateTime.now().getSecond();
|
|
||||||
|
|
||||||
final var computerNameText = NodeBuilder.text(player2Name);
|
|
||||||
final var computerNameSeparator = NodeBuilder.separator();
|
|
||||||
|
|
||||||
final var computerDifficultyText = NodeBuilder.text(AppContext.getString("computerDifficulty"));
|
|
||||||
final var computerDifficultySeparator = NodeBuilder.separator();
|
|
||||||
final var computerDifficultySlider = NodeBuilder.slider(10, computer2Difficulty, (difficulty) ->
|
|
||||||
computer2Difficulty = difficulty);
|
|
||||||
|
|
||||||
final var computerThinkTimeText = NodeBuilder.text(AppContext.getString("computerThinkTime"));
|
|
||||||
final var computerThinkTimeSlider = NodeBuilder.slider(5, computer2ThinkTime, (thinkTime) ->
|
|
||||||
computer2ThinkTime = thinkTime);
|
|
||||||
|
|
||||||
player2Container.addNodes(computerNameText, computerNameSeparator,
|
|
||||||
computerDifficultyText, computerDifficultySlider, computerDifficultySeparator,
|
|
||||||
computerThinkTimeText, computerThinkTimeSlider);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
final var serverIPText = NodeBuilder.text(AppContext.getString("serverIP"));
|
|
||||||
final var serverIPSeparator = NodeBuilder.separator();
|
|
||||||
final var serverIPInput = NodeBuilder.input(serverIP, (ip) -> {
|
|
||||||
serverIP = ip;
|
|
||||||
});
|
|
||||||
|
|
||||||
final var serverPortText = NodeBuilder.text(AppContext.getString("serverPort"));
|
|
||||||
final var serverPortInput = NodeBuilder.input(serverPort, (port) -> {
|
|
||||||
serverPort = port;
|
|
||||||
});
|
|
||||||
|
|
||||||
player2Container.addNodes(serverIPText, serverIPInput, serverIPSeparator,
|
|
||||||
serverPortText, serverPortInput);
|
|
||||||
}
|
|
||||||
|
|
||||||
final var versusText = NodeBuilder.header("VS");
|
|
||||||
|
|
||||||
final var connectionTypeText = NodeBuilder.text(AppContext.getString("connectionType") + ":");
|
|
||||||
final var connectionTypeToggle = NodeBuilder.toggle(AppContext.getString("local"), AppContext.getString("server"), !isConnectionLocal, (server) -> {
|
|
||||||
isConnectionLocal = !server;
|
|
||||||
reload();
|
|
||||||
});
|
|
||||||
|
|
||||||
final var playButton = NodeBuilder.button(isConnectionLocal ? AppContext.getString("start") : AppContext.getString("connect"), () -> {
|
|
||||||
final var information = new GameInformation(
|
|
||||||
new String[]{player1Name, player2Name},
|
|
||||||
new boolean[]{isPlayer1Human, isPlayer2Human},
|
|
||||||
new int[]{computer1Difficulty, computer2Difficulty},
|
|
||||||
new int[]{computer1ThinkTime, computer2ThinkTime},
|
|
||||||
isConnectionLocal, serverIP, serverPort);
|
|
||||||
|
|
||||||
if (isConnectionLocal) {
|
|
||||||
App.activate(new TicTacToeLayer(information));
|
|
||||||
} else {
|
|
||||||
App.activate(new ConnectedLayer(information));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
final Container mainContainer = new VerticalContainer(10);
|
|
||||||
final Container playersContainer = new HorizontalContainer(5);
|
|
||||||
final Container connectionTypeContainer = new HorizontalContainer(10);
|
|
||||||
|
|
||||||
mainContainer.addContainer(playersContainer, true);
|
|
||||||
mainContainer.addContainer(connectionTypeContainer, false);
|
|
||||||
mainContainer.addNodes(playButton);
|
|
||||||
|
|
||||||
connectionTypeContainer.addNodes(connectionTypeText, connectionTypeToggle);
|
|
||||||
|
|
||||||
playersContainer.addContainer(player1Container, true);
|
|
||||||
playersContainer.addNodes(versusText);
|
|
||||||
playersContainer.addContainer(player2Container, true);
|
|
||||||
|
|
||||||
final var backButton = NodeBuilder.button(AppContext.getString("back"), () -> {
|
|
||||||
App.activate(new MainLayer());
|
|
||||||
});
|
|
||||||
|
|
||||||
final Container controlContainer = new VerticalContainer(0);
|
|
||||||
controlContainer.addNodes(backButton);
|
|
||||||
|
|
||||||
addContainer(mainContainer, Pos.CENTER, 0, 0, 75, 75);
|
|
||||||
addContainer(controlContainer, Pos.BOTTOM_LEFT, 2, -2, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,194 +0,0 @@
|
|||||||
package org.toop.app.layer.layers;
|
|
||||||
|
|
||||||
import org.toop.app.App;
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
import org.toop.app.layer.NodeBuilder;
|
|
||||||
import org.toop.app.layer.Popup;
|
|
||||||
import org.toop.app.layer.containers.VerticalContainer;
|
|
||||||
import org.toop.framework.asset.resources.SettingsAsset;
|
|
||||||
import org.toop.framework.audio.events.AudioEvents;
|
|
||||||
import org.toop.framework.eventbus.EventFlow;
|
|
||||||
import org.toop.local.AppContext;
|
|
||||||
import org.toop.local.AppSettings;
|
|
||||||
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
import javafx.scene.control.ChoiceBox;
|
|
||||||
import javafx.scene.control.Label;
|
|
||||||
import javafx.scene.control.Slider;
|
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
public final class OptionsPopup extends Popup {
|
|
||||||
AppSettings appSettings = new AppSettings();
|
|
||||||
SettingsAsset settings = appSettings.getPath();
|
|
||||||
private boolean isWindowed = !(settings.getFullscreen());
|
|
||||||
|
|
||||||
public OptionsPopup() {
|
|
||||||
super(true, "bg-primary");
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
popAll();
|
|
||||||
|
|
||||||
final var languageHeader = NodeBuilder.header(AppContext.getString("language"));
|
|
||||||
final var languageSeparator = NodeBuilder.separator();
|
|
||||||
|
|
||||||
final var volumeHeader = NodeBuilder.header(AppContext.getString("volume"));
|
|
||||||
final var volumeSeparator = NodeBuilder.separator();
|
|
||||||
|
|
||||||
final var fxVolumeHeader = NodeBuilder.header(AppContext.getString("effectsVolume"));
|
|
||||||
final var fxVolumeSeparator = NodeBuilder.separator();
|
|
||||||
|
|
||||||
final var musicVolumeHeader = NodeBuilder.header(AppContext.getString("musicVolume"));
|
|
||||||
final var musicVolumeSeparator = NodeBuilder.separator();
|
|
||||||
|
|
||||||
final var themeHeader = NodeBuilder.header(AppContext.getString("theme"));
|
|
||||||
final var themeSeparator = NodeBuilder.separator();
|
|
||||||
|
|
||||||
final var layoutSizeHeader = NodeBuilder.header(AppContext.getString("layoutSize"));
|
|
||||||
final var layoutSizeSeparator = NodeBuilder.separator();
|
|
||||||
|
|
||||||
final var optionsContainer = new VerticalContainer(5);
|
|
||||||
optionsContainer.addNodes(languageHeader, languageChoiceBox(), languageSeparator);
|
|
||||||
optionsContainer.addNodes(volumeHeader, volumeSlider(), volumeSeparator);
|
|
||||||
optionsContainer.addNodes(fxVolumeHeader, fxVolumeSlider(), fxVolumeSeparator);
|
|
||||||
optionsContainer.addNodes(musicVolumeHeader, musicVolumeSlider(), musicVolumeSeparator);
|
|
||||||
optionsContainer.addNodes(themeHeader, themeChoiceBox(), themeSeparator);
|
|
||||||
optionsContainer.addNodes(layoutSizeHeader, layoutSizeChoiceBox(), layoutSizeSeparator);
|
|
||||||
optionsContainer.addNodes(fullscreenToggle());
|
|
||||||
|
|
||||||
final Container mainContainer = new VerticalContainer(50, "");
|
|
||||||
mainContainer.addContainer(optionsContainer, true);
|
|
||||||
|
|
||||||
final var backButton = NodeBuilder.button(AppContext.getString("back"), () -> {
|
|
||||||
App.pop();
|
|
||||||
});
|
|
||||||
|
|
||||||
final Container controlContainer = new VerticalContainer(5);
|
|
||||||
controlContainer.addNodes(backButton);
|
|
||||||
|
|
||||||
addContainer(mainContainer, Pos.CENTER, 0, 0, 0, 0);
|
|
||||||
addContainer(controlContainer, Pos.BOTTOM_LEFT, 2, -2, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private ChoiceBox<Locale> languageChoiceBox() {
|
|
||||||
assert AppContext.getLocalization() != null;
|
|
||||||
|
|
||||||
final ChoiceBox<Locale> languageChoiceBox = NodeBuilder.choiceBox((locale) -> {
|
|
||||||
if (locale == AppContext.getLocale()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
settings.setLocale(locale.toString());
|
|
||||||
AppContext.setLocale(locale);
|
|
||||||
|
|
||||||
App.reloadAll();
|
|
||||||
});
|
|
||||||
|
|
||||||
languageChoiceBox.setConverter(new javafx.util.StringConverter<>() {
|
|
||||||
@Override
|
|
||||||
public String toString(Locale locale) {
|
|
||||||
return AppContext.getString(locale.getDisplayName().toLowerCase());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Locale fromString(String string) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
languageChoiceBox.getItems().addAll(AppContext.getLocalization().getAvailableLocales());
|
|
||||||
languageChoiceBox.setValue(AppContext.getLocale());
|
|
||||||
|
|
||||||
return languageChoiceBox;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Slider volumeSlider() {
|
|
||||||
return NodeBuilder.slider(100, settings.getVolume(), (volume) -> {
|
|
||||||
settings.setVolume(volume);
|
|
||||||
new EventFlow().addPostEvent(new AudioEvents.ChangeVolume(volume.doubleValue())).asyncPostEvent();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private Slider fxVolumeSlider() {
|
|
||||||
return NodeBuilder.slider(100, settings.getFxVolume(), (volume) -> {
|
|
||||||
settings.setFxVolume(volume);
|
|
||||||
new EventFlow().addPostEvent(new AudioEvents.ChangeFxVolume(volume.doubleValue())).asyncPostEvent();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private Slider musicVolumeSlider() {
|
|
||||||
return NodeBuilder.slider(100, settings.getMusicVolume(), (volume) -> {
|
|
||||||
settings.setMusicVolume(volume);
|
|
||||||
new EventFlow().addPostEvent(new AudioEvents.ChangeMusicVolume(volume.doubleValue())).asyncPostEvent();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private Label fullscreenToggle() {
|
|
||||||
return NodeBuilder.toggle(AppContext.getString("windowed"), AppContext.getString("fullscreen"), !isWindowed, (fullscreen) -> {
|
|
||||||
isWindowed = !fullscreen;
|
|
||||||
|
|
||||||
settings.setFullscreen(fullscreen);
|
|
||||||
App.setFullscreen(fullscreen);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private ChoiceBox<String> themeChoiceBox() {
|
|
||||||
final ChoiceBox<String> themeChoiceBox = NodeBuilder.choiceBox((theme) -> {
|
|
||||||
if (theme.equalsIgnoreCase(settings.getTheme())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
settings.setTheme(theme);
|
|
||||||
App.setStyle(theme, settings.getLayoutSize());
|
|
||||||
});
|
|
||||||
|
|
||||||
themeChoiceBox.setConverter(new javafx.util.StringConverter<>() {
|
|
||||||
@Override
|
|
||||||
public String toString(String theme) {
|
|
||||||
return AppContext.getString(theme);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String fromString(String string) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
themeChoiceBox.getItems().addAll("dark", "light", "dark-hc", "light-hc");
|
|
||||||
themeChoiceBox.setValue(settings.getTheme());
|
|
||||||
|
|
||||||
return themeChoiceBox;
|
|
||||||
}
|
|
||||||
|
|
||||||
private ChoiceBox<String> layoutSizeChoiceBox() {
|
|
||||||
final ChoiceBox<String> layoutSizeChoiceBox = NodeBuilder.choiceBox((layoutSize) -> {
|
|
||||||
if (layoutSize.equalsIgnoreCase(settings.getLayoutSize())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
settings.setLayoutSize(layoutSize);
|
|
||||||
App.setStyle(settings.getTheme(), layoutSize);
|
|
||||||
});
|
|
||||||
|
|
||||||
layoutSizeChoiceBox.setConverter(new javafx.util.StringConverter<>() {
|
|
||||||
@Override
|
|
||||||
public String toString(String layoutSize) {
|
|
||||||
return AppContext.getString(layoutSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String fromString(String string) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
layoutSizeChoiceBox.getItems().addAll("small", "medium", "large");
|
|
||||||
layoutSizeChoiceBox.setValue(settings.getLayoutSize());
|
|
||||||
|
|
||||||
return layoutSizeChoiceBox;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
package org.toop.app.layer.layers;
|
|
||||||
|
|
||||||
import org.toop.app.App;
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
import org.toop.app.layer.NodeBuilder;
|
|
||||||
import org.toop.app.layer.Popup;
|
|
||||||
import org.toop.app.layer.containers.HorizontalContainer;
|
|
||||||
import org.toop.app.layer.containers.VerticalContainer;
|
|
||||||
import org.toop.local.AppContext;
|
|
||||||
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
|
|
||||||
public final class QuitPopup extends Popup {
|
|
||||||
public QuitPopup() {
|
|
||||||
super(true);
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
popAll();
|
|
||||||
|
|
||||||
final var sureText = NodeBuilder.header(AppContext.getString("quitSure"));
|
|
||||||
|
|
||||||
final var yesButton = NodeBuilder.button(AppContext.getString("yes"), () -> {
|
|
||||||
App.quit();
|
|
||||||
});
|
|
||||||
|
|
||||||
final var noButton = NodeBuilder.button(AppContext.getString("no"), () -> {
|
|
||||||
App.pop();
|
|
||||||
});
|
|
||||||
|
|
||||||
final Container controlContainer = new HorizontalContainer(30);
|
|
||||||
controlContainer.addNodes(yesButton, noButton);
|
|
||||||
|
|
||||||
final Container mainContainer = new VerticalContainer(30);
|
|
||||||
mainContainer.addNodes(sureText);
|
|
||||||
mainContainer.addContainer(controlContainer, false);
|
|
||||||
|
|
||||||
addContainer(mainContainer, Pos.CENTER, 0, 0, 30, 30);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
package org.toop.app.layer.layers.game;
|
|
||||||
|
|
||||||
import org.toop.app.App;
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
import org.toop.app.layer.NodeBuilder;
|
|
||||||
import org.toop.app.layer.Popup;
|
|
||||||
import org.toop.app.layer.containers.VerticalContainer;
|
|
||||||
import org.toop.app.layer.layers.MainLayer;
|
|
||||||
import org.toop.local.AppContext;
|
|
||||||
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
|
|
||||||
public class GameFinishedPopup extends Popup {
|
|
||||||
private final boolean isDraw;
|
|
||||||
private final String winner;
|
|
||||||
|
|
||||||
public GameFinishedPopup(boolean isDraw, String winner) {
|
|
||||||
super(true, "bg-popup");
|
|
||||||
|
|
||||||
this.isDraw = isDraw;
|
|
||||||
this.winner = winner;
|
|
||||||
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
popAll();
|
|
||||||
|
|
||||||
final Container mainContainer = new VerticalContainer(30);
|
|
||||||
|
|
||||||
if (isDraw) {
|
|
||||||
final var drawHeader = NodeBuilder.header(AppContext.getString("drawText"));
|
|
||||||
final var goodGameText = NodeBuilder.text(AppContext.getString("goodGameText"));
|
|
||||||
|
|
||||||
mainContainer.addNodes(drawHeader, goodGameText);
|
|
||||||
} else {
|
|
||||||
final var winHeader = NodeBuilder.header(AppContext.getString("congratulations") + ": " + winner);
|
|
||||||
final var goodGameText = NodeBuilder.text(AppContext.getString("goodGameText"));
|
|
||||||
|
|
||||||
mainContainer.addNodes(winHeader, goodGameText);
|
|
||||||
}
|
|
||||||
|
|
||||||
final var backToMainMenuButton = NodeBuilder.button(AppContext.getString("backToMainMenu"), () -> {
|
|
||||||
App.activate(new MainLayer());
|
|
||||||
});
|
|
||||||
|
|
||||||
mainContainer.addNodes(backToMainMenuButton);
|
|
||||||
|
|
||||||
addContainer(mainContainer, Pos.CENTER, 0, 0, 30, 30);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,320 +0,0 @@
|
|||||||
package org.toop.app.layer.layers.game;
|
|
||||||
|
|
||||||
import javafx.scene.text.Text;
|
|
||||||
import org.toop.app.App;
|
|
||||||
import org.toop.app.GameInformation;
|
|
||||||
import org.toop.app.canvas.TicTacToeCanvas;
|
|
||||||
import org.toop.app.layer.Container;
|
|
||||||
import org.toop.app.layer.Layer;
|
|
||||||
import org.toop.app.layer.NodeBuilder;
|
|
||||||
import org.toop.app.layer.containers.HorizontalContainer;
|
|
||||||
import org.toop.app.layer.containers.VerticalContainer;
|
|
||||||
import org.toop.app.layer.layers.MainLayer;
|
|
||||||
import org.toop.framework.eventbus.EventFlow;
|
|
||||||
import org.toop.framework.networking.events.NetworkEvents;
|
|
||||||
import org.toop.game.Game;
|
|
||||||
import org.toop.game.tictactoe.TicTacToe;
|
|
||||||
import org.toop.game.tictactoe.TicTacToeAI;
|
|
||||||
import org.toop.local.AppContext;
|
|
||||||
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
import javafx.scene.paint.Color;
|
|
||||||
|
|
||||||
import java.util.concurrent.BlockingQueue;
|
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
|
||||||
|
|
||||||
public final class TicTacToeLayer extends Layer {
|
|
||||||
private TicTacToeCanvas canvas;
|
|
||||||
|
|
||||||
private AtomicReference<TicTacToe> ticTacToe;
|
|
||||||
private TicTacToeAI ticTacToeAI;
|
|
||||||
|
|
||||||
private GameInformation information;
|
|
||||||
|
|
||||||
private final Text currentPlayerNameText;
|
|
||||||
private final Text currentPlayerMoveText;
|
|
||||||
|
|
||||||
private final BlockingQueue<Game.Move> playerMoveQueue = new LinkedBlockingQueue<>();
|
|
||||||
|
|
||||||
// Todo: set these from the server
|
|
||||||
private String player2Name = "";
|
|
||||||
|
|
||||||
final AtomicBoolean firstPlayerIsMe = new AtomicBoolean(true);
|
|
||||||
|
|
||||||
public TicTacToeLayer(GameInformation information) {
|
|
||||||
super("bg-primary");
|
|
||||||
|
|
||||||
canvas = new TicTacToeCanvas(Color.LIME, (App.getHeight() / 100) * 75, (App.getHeight() / 100) * 75, (cell) -> {
|
|
||||||
try {
|
|
||||||
if (information.isConnectionLocal()) {
|
|
||||||
if (ticTacToe.get().getCurrentTurn() == 0) {
|
|
||||||
playerMoveQueue.put(new Game.Move(cell, 'X'));
|
|
||||||
} else {
|
|
||||||
playerMoveQueue.put(new Game.Move(cell, 'O'));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (information.isPlayerHuman()[0]) {
|
|
||||||
if (ticTacToe.get().getCurrentTurn() == 0) {
|
|
||||||
if (firstPlayerIsMe.get()) {
|
|
||||||
playerMoveQueue.put(new Game.Move(cell, 'X'));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!firstPlayerIsMe.get()) {
|
|
||||||
playerMoveQueue.put(new Game.Move(cell, 'O'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (InterruptedException _) {}
|
|
||||||
});
|
|
||||||
|
|
||||||
ticTacToe = new AtomicReference<>(new TicTacToe());
|
|
||||||
ticTacToeAI = new TicTacToeAI();
|
|
||||||
|
|
||||||
this.information = information;
|
|
||||||
|
|
||||||
if (information.isConnectionLocal()) {
|
|
||||||
new Thread(this::localGameThread).start();
|
|
||||||
}
|
|
||||||
|
|
||||||
currentPlayerNameText = NodeBuilder.header("");
|
|
||||||
currentPlayerMoveText = NodeBuilder.header("");
|
|
||||||
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
public TicTacToeLayer(GameInformation information, long clientID) {
|
|
||||||
this(information);
|
|
||||||
|
|
||||||
Thread a = new Thread(this::serverGameThread);
|
|
||||||
a.setDaemon(false);
|
|
||||||
a.start();
|
|
||||||
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
public TicTacToeLayer(GameInformation information, long clientID, NetworkEvents.GameMatchResponse resp) {
|
|
||||||
this(information);
|
|
||||||
|
|
||||||
Thread a = new Thread(this::serverGameThread);
|
|
||||||
a.setDaemon(false);
|
|
||||||
a.start();
|
|
||||||
|
|
||||||
handleServerGameStart(resp);
|
|
||||||
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
popAll();
|
|
||||||
|
|
||||||
canvas.resize((App.getHeight() / 100) * 75, (App.getHeight() / 100) * 75);
|
|
||||||
|
|
||||||
for (int i = 0; i < ticTacToe.get().board.length; i++) {
|
|
||||||
final char value = ticTacToe.get().board[i];
|
|
||||||
|
|
||||||
if (value == 'X') {
|
|
||||||
canvas.drawX(Color.RED, i);
|
|
||||||
} else if (value == 'O') {
|
|
||||||
canvas.drawO(Color.BLUE, i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final var backButton = NodeBuilder.button(AppContext.getString("back"), () -> {
|
|
||||||
App.activate(new MainLayer());
|
|
||||||
});
|
|
||||||
|
|
||||||
final Container controlContainer = new VerticalContainer(5);
|
|
||||||
controlContainer.addNodes(backButton);
|
|
||||||
|
|
||||||
final Container informationContainer = new HorizontalContainer(15);
|
|
||||||
informationContainer.addNodes(currentPlayerNameText, currentPlayerMoveText);
|
|
||||||
|
|
||||||
addContainer(controlContainer, Pos.BOTTOM_LEFT, 2, -2, 0, 0);
|
|
||||||
addContainer(informationContainer, Pos.TOP_LEFT, 2, 2, 0, 0);
|
|
||||||
addGameCanvas(canvas, Pos.CENTER, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private int compurterDifficultyToDepth(int maxDifficulty, int difficulty) {
|
|
||||||
return (int) (((float) maxDifficulty / difficulty) * 9);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void localGameThread() {
|
|
||||||
boolean running = true;
|
|
||||||
|
|
||||||
while (running) {
|
|
||||||
final int currentPlayer = ticTacToe.get().getCurrentTurn();
|
|
||||||
|
|
||||||
currentPlayerNameText.setText(information.playerName()[currentPlayer]);
|
|
||||||
currentPlayerMoveText.setText(ticTacToe.get().getCurrentTurn() == 0? "X" : "O");
|
|
||||||
|
|
||||||
Game.Move move = null;
|
|
||||||
|
|
||||||
if (information.isPlayerHuman()[currentPlayer]) {
|
|
||||||
try {
|
|
||||||
final Game.Move wants = playerMoveQueue.take();
|
|
||||||
final Game.Move[] legalMoves = ticTacToe.get().getLegalMoves();
|
|
||||||
|
|
||||||
for (final Game.Move legalMove : legalMoves) {
|
|
||||||
if (legalMove.position() == wants.position() && legalMove.value() == wants.value()) {
|
|
||||||
move = wants;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (InterruptedException _) {}
|
|
||||||
} else {
|
|
||||||
final long start = System.currentTimeMillis();
|
|
||||||
|
|
||||||
move = ticTacToeAI.findBestMove(ticTacToe.get(), compurterDifficultyToDepth(10,
|
|
||||||
information.computerDifficulty()[currentPlayer]));
|
|
||||||
|
|
||||||
if (information.computerThinkTime()[currentPlayer] > 0) {
|
|
||||||
final long elapsedTime = System.currentTimeMillis() - start;
|
|
||||||
final long sleepTime = information.computerThinkTime()[currentPlayer] * 1000L - elapsedTime;
|
|
||||||
|
|
||||||
try {
|
|
||||||
Thread.sleep(sleepTime);
|
|
||||||
} catch (InterruptedException _) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (move == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
final Game.State state = ticTacToe.get().play(move);
|
|
||||||
|
|
||||||
if (move.value() == 'X') {
|
|
||||||
canvas.drawX(Color.RED, move.position());
|
|
||||||
} else if (move.value() == 'O') {
|
|
||||||
canvas.drawO(Color.BLUE, move.position());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state != Game.State.NORMAL) {
|
|
||||||
if (state == Game.State.WIN) {
|
|
||||||
App.push(new GameFinishedPopup(false, information.playerName()[ticTacToe.get().getCurrentTurn()]));
|
|
||||||
} else if (state == Game.State.DRAW) {
|
|
||||||
App.push(new GameFinishedPopup(true, ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
running = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void serverGameThread() {
|
|
||||||
new EventFlow()
|
|
||||||
.listen(this::handleServerGameStart) // <-----------
|
|
||||||
.listen(this::yourTurnResponse)
|
|
||||||
.listen(this::onMoveResponse)
|
|
||||||
.listen(this::handleReceivedMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleServerGameStart(NetworkEvents.GameMatchResponse resp) {
|
|
||||||
// Meneer Bas de Jong. Dit functie wordt niet aangeroepen als je de challenger bent.
|
|
||||||
// Ik heb veel dingen geprobeert. FUCKING veel dingen. Hij doet het niet.
|
|
||||||
// Ik heb zelfs in jou code gekeken en unsubscribeAfterSuccess op false gezet. (zie ConnectedLayer).
|
|
||||||
// Alle andere functies worden wel gecalt. Behalve dit.
|
|
||||||
|
|
||||||
// Ben jij gehandicapt of ik? Want het moet 1 van de 2 zijn. Ik ben dit al 2 uur aan het debuggen.
|
|
||||||
// Ik ga nu slapen (04:46).
|
|
||||||
|
|
||||||
// ⠀⠀⠀⠀⠀⠀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⢀⣴⣿⣿⠿⣟⢷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⢸⣏⡏⠀⠀⠀⢣⢻⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⢸⣟⠧⠤⠤⠔⠋⠀⢿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⠀⣿⡆⠀⠀⠀⠀⠀⠸⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⠀⠘⣿⡀⢀⣶⠤⠒⠀⢻⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⠀⠀⢹⣧⠀⠀⠀⠀⠀⠈⢿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⠀⠀⠀⣿⡆⠀⠀⠀⠀⠀⠈⢿⣆⣠⣤⣤⣤⣤⣴⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⠀⢀⣾⢿⢿⠀⠀⠀⢀⣀⣀⠘⣿⠋⠁⠀⠙⢇⠀⠀⠙⢿⣦⡀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⢀⣾⢇⡞⠘⣧⠀⢖⡭⠞⢛⡄⠘⣆⠀⠀⠀⠈⢧⠀⠀⠀⠙⢿⣄⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⣠⣿⣛⣥⠤⠤⢿⡄⠀⠀⠈⠉⠀⠀⠹⡄⠀⠀⠀⠈⢧⠀⠀⠀⠈⠻⣦⠀⠀⠀
|
|
||||||
// ⠀⣼⡟⡱⠛⠙⠀⠀⠘⢷⡀⠀⠀⠀⠀⠀⠀⠹⡀⠀⠀⠀⠈⣧⠀⠀⠀⠀⠹⣧⡀⠀
|
|
||||||
// ⢸⡏⢠⠃⠀⠀⠀⠀⠀⠀⢳⡀⠀⠀⠀⠀⠀⠀⢳⡀⠀⠀⠀⠘⣧⠀⠀⠀⠀⠸⣷⡀
|
|
||||||
// ⠸⣧⠘⡇⠀⠀⠀⠀⠀⠀⠀⢳⡀⠀⠀⠀⠀⠀⠀⢣⠀⠀⠀⠀⢹⡇⠀⠀⠀⠀⣿⠇
|
|
||||||
// ⠀⣿⡄⢳⠀⠀⠀⠀⠀⠀⠀⠈⣷⠀⠀⠀⠀⠀⠀⠈⠆⠀⠀⠀⠀⠀⠀⠀⠀⣼⡟⠀
|
|
||||||
// ⠀⢹⡇⠘⣇⠀⠀⠀⠀⠀⠀⠰⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣼⡟⠀⠀
|
|
||||||
// ⠀⢸⡇⠀⢹⡆⠀⠀⠀⠀⠀⠀⠙⠁⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⢳⣼⠟⠀⠀⠀
|
|
||||||
// ⠀⠸⣧⣀⠀⢳⡀⠀⠀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⢃⠀⢀⣴⡿⠁⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠈⠙⢷⣄⢳⡀⠀⠀⠀⠀⠀⠀⢳⡀⠀⠀⠀⠀⠀⣠⡿⠟⠛⠉⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⠀⠈⠻⢿⣷⣦⣄⣀⣀⣠⣤⠾⠷⣦⣤⣤⡶⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
// ⠀⠀⠀⠀⠀⠀⠀⠈⠉⠛⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
||||||
|
|
||||||
player2Name = resp.opponent();
|
|
||||||
System.out.println(player2Name);
|
|
||||||
|
|
||||||
currentPlayerMoveText.setText("X");
|
|
||||||
|
|
||||||
if(!resp.playerToMove().equalsIgnoreCase(resp.opponent())) {
|
|
||||||
currentPlayerNameText.setText(information.playerName()[0]);
|
|
||||||
firstPlayerIsMe.set(true);
|
|
||||||
|
|
||||||
System.out.printf("I am starting: My client id is %d\n", resp.clientId());
|
|
||||||
} else {
|
|
||||||
currentPlayerNameText.setText(player2Name);
|
|
||||||
firstPlayerIsMe.set(false);
|
|
||||||
|
|
||||||
System.out.printf("I am NOT starting: My client id is %d\n", resp.clientId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onMoveResponse(NetworkEvents.GameMoveResponse resp) {
|
|
||||||
char playerChar;
|
|
||||||
|
|
||||||
if (!resp.player().equalsIgnoreCase(player2Name)) {
|
|
||||||
playerChar = firstPlayerIsMe.get()? 'X' : 'O';
|
|
||||||
} else {
|
|
||||||
playerChar = firstPlayerIsMe.get()? 'O' : 'X';
|
|
||||||
}
|
|
||||||
|
|
||||||
final Game.Move move = new Game.Move(Integer.parseInt(resp.move()), playerChar);
|
|
||||||
final Game.State state = ticTacToe.get().play(move);
|
|
||||||
|
|
||||||
if (state != Game.State.NORMAL) { //todo differentiate between future draw guaranteed and is currently a draw
|
|
||||||
if (state == Game.State.WIN) {
|
|
||||||
if (!resp.player().equalsIgnoreCase(player2Name)) {
|
|
||||||
App.push(new GameFinishedPopup(false, information.playerName()[0]));
|
|
||||||
} else {
|
|
||||||
App.push(new GameFinishedPopup(false, player2Name));
|
|
||||||
}
|
|
||||||
} else if (state == Game.State.DRAW) {
|
|
||||||
App.push(new GameFinishedPopup(true, ""));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (move.value() == 'X') {
|
|
||||||
canvas.drawX(Color.RED, move.position());
|
|
||||||
} else if (move.value() == 'O') {
|
|
||||||
canvas.drawO(Color.BLUE, move.position());
|
|
||||||
}
|
|
||||||
|
|
||||||
currentPlayerNameText.setText(ticTacToe.get().getCurrentTurn() == (firstPlayerIsMe.get()? 0 : 1)? information.playerName()[0] : player2Name);
|
|
||||||
currentPlayerMoveText.setText(ticTacToe.get().getCurrentTurn() == 0? "X" : "O");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void yourTurnResponse(NetworkEvents.YourTurnResponse response) {
|
|
||||||
int position = -1;
|
|
||||||
|
|
||||||
if (information.isPlayerHuman()[0]) {
|
|
||||||
try {
|
|
||||||
position = playerMoveQueue.take().position();
|
|
||||||
System.out.println("TEST" + position);
|
|
||||||
} catch (InterruptedException _) {}
|
|
||||||
} else {
|
|
||||||
final Game.Move move = ticTacToeAI.findBestMove(ticTacToe.get(), compurterDifficultyToDepth(10,
|
|
||||||
information.computerDifficulty()[0]));
|
|
||||||
|
|
||||||
position = move.position();
|
|
||||||
}
|
|
||||||
|
|
||||||
new EventFlow().addPostEvent(new NetworkEvents.SendMove(response.clientId(), (short)position))
|
|
||||||
.postEvent();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleReceivedMessage(NetworkEvents.ReceivedMessage msg) {
|
|
||||||
System.out.println("Received Message: " + msg.message()); //todo add chat window
|
|
||||||
}
|
|
||||||
}
|
|
||||||
400
app/src/main/java/org/toop/app/view/View.java
Normal file
400
app/src/main/java/org/toop/app/view/View.java
Normal file
@@ -0,0 +1,400 @@
|
|||||||
|
package org.toop.app.view;
|
||||||
|
|
||||||
|
import org.toop.framework.audio.events.AudioEvents;
|
||||||
|
import org.toop.framework.eventbus.EventFlow;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.ComboBox;
|
||||||
|
import javafx.scene.control.ScrollPane;
|
||||||
|
import javafx.scene.control.Separator;
|
||||||
|
import javafx.scene.control.Slider;
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.scene.layout.HBox;
|
||||||
|
import javafx.scene.layout.Region;
|
||||||
|
import javafx.scene.layout.StackPane;
|
||||||
|
import javafx.scene.layout.VBox;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public abstract class View {
|
||||||
|
private final boolean mainView;
|
||||||
|
|
||||||
|
private final StackPane view;
|
||||||
|
private final Map<String, Node> nodeMap;
|
||||||
|
|
||||||
|
protected View(boolean mainView, String cssClass) {
|
||||||
|
this.mainView = mainView;
|
||||||
|
|
||||||
|
view = new StackPane();
|
||||||
|
view.getStyleClass().add(cssClass);
|
||||||
|
|
||||||
|
nodeMap = new HashMap<String, Node>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(Pos position, Node node) {
|
||||||
|
assert node != null;
|
||||||
|
|
||||||
|
StackPane.setAlignment(node, position);
|
||||||
|
view.getChildren().add(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Region hspacer() {
|
||||||
|
final Region hspacer = new Region();
|
||||||
|
hspacer.getStyleClass().add("hspacer");
|
||||||
|
|
||||||
|
return hspacer;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Region vspacer() {
|
||||||
|
final Region vspacer = new Region();
|
||||||
|
vspacer.getStyleClass().add("vspacer");
|
||||||
|
|
||||||
|
return vspacer;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ScrollPane fit(String identifier, String cssClass, Node node) {
|
||||||
|
assert node != null;
|
||||||
|
|
||||||
|
final ScrollPane fit = new ScrollPane(node);
|
||||||
|
fit.getStyleClass().add(cssClass);
|
||||||
|
|
||||||
|
fit.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
|
||||||
|
fit.setFitToWidth(true);
|
||||||
|
fit.setFitToHeight(true);
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, fit);
|
||||||
|
}
|
||||||
|
|
||||||
|
return fit;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ScrollPane fit(String identifier, Node node) {
|
||||||
|
return fit(identifier, "fit", node);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ScrollPane fit(Node node) {
|
||||||
|
return fit("", node);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected HBox hbox(String identifier, String cssClass, Node... nodes) {
|
||||||
|
assert !nodeMap.containsKey(identifier);
|
||||||
|
|
||||||
|
final HBox hbox = new HBox();
|
||||||
|
hbox.getStyleClass().add(cssClass);
|
||||||
|
hbox.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
|
||||||
|
|
||||||
|
for (final Node node : nodes) {
|
||||||
|
if (node != null) {
|
||||||
|
hbox.getChildren().add(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, hbox);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected HBox hbox(String identifier, Node... nodes) {
|
||||||
|
return hbox(identifier, "container", nodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected HBox hbox(Node... nodes) {
|
||||||
|
return hbox("", nodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected HBox hboxFill(String identifier, String cssClass, Node... nodes) {
|
||||||
|
final HBox hbox = hbox(identifier, cssClass, nodes);
|
||||||
|
|
||||||
|
for (final Node node : hbox.getChildren()) {
|
||||||
|
if (node instanceof Region) {
|
||||||
|
((Region)node).setMaxHeight(Double.MAX_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected HBox hboxFill(String identifier, Node... nodes) {
|
||||||
|
final HBox hbox = hbox(identifier, nodes);
|
||||||
|
|
||||||
|
for (final Node node : hbox.getChildren()) {
|
||||||
|
if (node instanceof Region) {
|
||||||
|
((Region)node).setMaxHeight(Double.MAX_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected HBox hboxFill(Node... nodes) {
|
||||||
|
final HBox hbox = hbox(nodes);
|
||||||
|
|
||||||
|
for (final Node node : hbox.getChildren()) {
|
||||||
|
if (node instanceof Region) {
|
||||||
|
((Region)node).setMaxHeight(Double.MAX_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected VBox vbox(String identifier, String cssClass, Node... nodes) {
|
||||||
|
assert !nodeMap.containsKey(identifier);
|
||||||
|
|
||||||
|
final VBox vbox = new VBox();
|
||||||
|
vbox.getStyleClass().add(cssClass);
|
||||||
|
vbox.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
|
||||||
|
|
||||||
|
for (final Node node : nodes) {
|
||||||
|
if (node != null) {
|
||||||
|
vbox.getChildren().add(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, vbox);
|
||||||
|
}
|
||||||
|
|
||||||
|
return vbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected VBox vbox(String identifier, Node... nodes) {
|
||||||
|
return vbox(identifier, "container", nodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected VBox vbox(Node... nodes) {
|
||||||
|
return vbox("", nodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected VBox vboxFill(String identifier, String cssClass, Node... nodes) {
|
||||||
|
final VBox vbox = vbox(identifier, cssClass, nodes);
|
||||||
|
|
||||||
|
for (final Node node : vbox.getChildren()) {
|
||||||
|
if (node instanceof Region) {
|
||||||
|
((Region)node).setMaxWidth(Double.MAX_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected VBox vboxFill(String identifier, Node... nodes) {
|
||||||
|
final VBox vbox = vbox(identifier, nodes);
|
||||||
|
|
||||||
|
for (final Node node : vbox.getChildren()) {
|
||||||
|
if (node instanceof Region) {
|
||||||
|
((Region)node).setMaxWidth(Double.MAX_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected VBox vboxFill(Node... nodes) {
|
||||||
|
final VBox vbox = vbox(nodes);
|
||||||
|
|
||||||
|
for (final Node node : vbox.getChildren()) {
|
||||||
|
if (node instanceof Region) {
|
||||||
|
((Region)node).setMaxWidth(Double.MAX_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Separator separator(String identifier, String cssClass) {
|
||||||
|
assert !nodeMap.containsKey(identifier);
|
||||||
|
|
||||||
|
final Separator separator = new Separator();
|
||||||
|
separator.getStyleClass().add(cssClass);
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, separator);
|
||||||
|
}
|
||||||
|
|
||||||
|
return separator;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Separator separator(String identifier) {
|
||||||
|
return separator(identifier, "separator");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Separator separator() {
|
||||||
|
return separator("");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Text header(String identifier, String cssClass) {
|
||||||
|
assert !nodeMap.containsKey(identifier);
|
||||||
|
|
||||||
|
final Text header = new Text();
|
||||||
|
header.getStyleClass().add(cssClass);
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, header);
|
||||||
|
}
|
||||||
|
|
||||||
|
return header;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Text header(String identifier) {
|
||||||
|
return header(identifier, "header");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Text header() {
|
||||||
|
return header("");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Text text(String identifier, String cssClass) {
|
||||||
|
assert !nodeMap.containsKey(identifier);
|
||||||
|
|
||||||
|
final Text text = new Text();
|
||||||
|
text.getStyleClass().add(cssClass);
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, text);
|
||||||
|
}
|
||||||
|
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Text text(String identifier) {
|
||||||
|
return text(identifier, "text");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Text text() {
|
||||||
|
return text("");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Button button(String identifier, String cssClass) {
|
||||||
|
assert !nodeMap.containsKey(identifier);
|
||||||
|
|
||||||
|
final Button button = new Button();
|
||||||
|
button.getStyleClass().add(cssClass);
|
||||||
|
|
||||||
|
button.setOnMouseClicked(_ -> {
|
||||||
|
new EventFlow().addPostEvent(new AudioEvents.ClickButton()).asyncPostEvent();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, button);
|
||||||
|
}
|
||||||
|
|
||||||
|
return button;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Button button(String identifier) {
|
||||||
|
return button(identifier, "button");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Button button() {
|
||||||
|
return button("");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Slider slider(String identifier, String cssClass) {
|
||||||
|
assert !nodeMap.containsKey(identifier);
|
||||||
|
|
||||||
|
final Slider slider = new Slider();
|
||||||
|
slider.getStyleClass().add(cssClass);
|
||||||
|
|
||||||
|
slider.setMinorTickCount(0);
|
||||||
|
slider.setMajorTickUnit(1);
|
||||||
|
slider.setBlockIncrement(1);
|
||||||
|
|
||||||
|
slider.setSnapToTicks(true);
|
||||||
|
slider.setShowTickLabels(true);
|
||||||
|
|
||||||
|
slider.setOnMouseClicked(_ -> {
|
||||||
|
new EventFlow().addPostEvent(new AudioEvents.ClickButton()).asyncPostEvent();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, slider);
|
||||||
|
}
|
||||||
|
|
||||||
|
return slider;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Slider slider(String identifier) {
|
||||||
|
return slider(identifier, "slider");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Slider slider() {
|
||||||
|
return slider("");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected TextField input(String identifier, String cssClass) {
|
||||||
|
assert !nodeMap.containsKey(identifier);
|
||||||
|
|
||||||
|
final TextField input = new TextField();
|
||||||
|
input.getStyleClass().add(cssClass);
|
||||||
|
|
||||||
|
input.setOnMouseClicked(_ -> {
|
||||||
|
new EventFlow().addPostEvent(new AudioEvents.ClickButton()).asyncPostEvent();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, input);
|
||||||
|
}
|
||||||
|
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected TextField input(String identifier) {
|
||||||
|
return input(identifier, "input");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected TextField input() {
|
||||||
|
return input("");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected <T> ComboBox<T> combobox(String identifier, String cssClass) {
|
||||||
|
assert !nodeMap.containsKey(identifier);
|
||||||
|
|
||||||
|
final ComboBox<T> combobox = new ComboBox<T>();
|
||||||
|
combobox.getStyleClass().add(cssClass);
|
||||||
|
|
||||||
|
combobox.setOnMouseClicked(_ -> {
|
||||||
|
new EventFlow().addPostEvent(new AudioEvents.ClickButton()).asyncPostEvent();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!identifier.isEmpty()) {
|
||||||
|
nodeMap.put(identifier, combobox);
|
||||||
|
}
|
||||||
|
|
||||||
|
return combobox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected <T> ComboBox<T> combobox(String identifier) {
|
||||||
|
return combobox(identifier, "combo-box");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected <T> ComboBox<T> combobox() {
|
||||||
|
return combobox("");
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
protected <T extends Node> T get(String identifier) {
|
||||||
|
assert nodeMap.containsKey(identifier);
|
||||||
|
return (T) nodeMap.get(identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void clear() {
|
||||||
|
view.getChildren().clear();
|
||||||
|
nodeMap.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMainView() { return mainView; }
|
||||||
|
public Region getView() { return view; }
|
||||||
|
|
||||||
|
public abstract void setup();
|
||||||
|
public void cleanup() {
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
105
app/src/main/java/org/toop/app/view/ViewStack.java
Normal file
105
app/src/main/java/org/toop/app/view/ViewStack.java
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
package org.toop.app.view;
|
||||||
|
|
||||||
|
import javafx.application.Platform;
|
||||||
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.layout.StackPane;
|
||||||
|
|
||||||
|
import java.util.Stack;
|
||||||
|
|
||||||
|
public final class ViewStack {
|
||||||
|
private static boolean setup = false;
|
||||||
|
|
||||||
|
private static StackPane root;
|
||||||
|
|
||||||
|
private static View active;
|
||||||
|
private static Stack<View> stack;
|
||||||
|
|
||||||
|
public static void setup(Scene scene) {
|
||||||
|
assert scene != null;
|
||||||
|
|
||||||
|
if (setup) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
root = new StackPane();
|
||||||
|
|
||||||
|
active = null;
|
||||||
|
stack = new Stack<View>();
|
||||||
|
|
||||||
|
scene.setRoot(root);
|
||||||
|
|
||||||
|
setup = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void cleanup() {
|
||||||
|
assert setup;
|
||||||
|
|
||||||
|
final var count = stack.size();
|
||||||
|
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (active != null) {
|
||||||
|
active.cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
setup = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void reload() {
|
||||||
|
assert setup;
|
||||||
|
|
||||||
|
for (final var view : stack) {
|
||||||
|
view.cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (active != null) {
|
||||||
|
active.cleanup();
|
||||||
|
active.setup();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (final var view : stack) {
|
||||||
|
view.setup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void push(View view) {
|
||||||
|
assert setup;
|
||||||
|
assert view != null;
|
||||||
|
|
||||||
|
if (view.isMainView()) {
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
if (active != null) {
|
||||||
|
root.getChildren().removeFirst();
|
||||||
|
active.cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
root.getChildren().addFirst(view.getView());
|
||||||
|
view.setup();
|
||||||
|
|
||||||
|
active = view;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
stack.push(view);
|
||||||
|
root.getChildren().addLast(view.getView());
|
||||||
|
view.setup();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void pop() {
|
||||||
|
assert setup;
|
||||||
|
|
||||||
|
if (stack.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
final var last = stack.pop();
|
||||||
|
root.getChildren().removeLast();
|
||||||
|
last.cleanup();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
118
app/src/main/java/org/toop/app/view/views/ChallengeView.java
Normal file
118
app/src/main/java/org/toop/app/view/views/ChallengeView.java
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.GameInformation;
|
||||||
|
import org.toop.app.Server;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.Slider;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
public final class ChallengeView extends View {
|
||||||
|
private final GameInformation.Player playerInformation;
|
||||||
|
|
||||||
|
private final String challenger;
|
||||||
|
private final String game;
|
||||||
|
|
||||||
|
private final Consumer<GameInformation.Player> onAccept;
|
||||||
|
|
||||||
|
public ChallengeView(String challenger, String game, Consumer<GameInformation.Player> onAccept) {
|
||||||
|
super(false, "bg-popup");
|
||||||
|
|
||||||
|
playerInformation = new GameInformation.Player();
|
||||||
|
|
||||||
|
this.challenger = challenger;
|
||||||
|
this.game = game;
|
||||||
|
|
||||||
|
this.onAccept = onAccept;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Text challengeText = text();
|
||||||
|
challengeText.setText(AppContext.getString("you-were-challenged-by"));
|
||||||
|
|
||||||
|
final Text challengerHeader = header();
|
||||||
|
challengerHeader.setText(challenger);
|
||||||
|
|
||||||
|
final Text gameText = text();
|
||||||
|
gameText.setText(AppContext.getString("to-a-game-of") + " " + game);
|
||||||
|
|
||||||
|
final Button acceptButton = button();
|
||||||
|
acceptButton.setText(AppContext.getString("accept"));
|
||||||
|
acceptButton.setOnAction(_ -> {
|
||||||
|
onAccept.accept(playerInformation);
|
||||||
|
});
|
||||||
|
|
||||||
|
final Button denyButton = button();
|
||||||
|
denyButton.setText(AppContext.getString("deny"));
|
||||||
|
denyButton.setOnAction(_ -> {
|
||||||
|
ViewStack.pop();
|
||||||
|
});
|
||||||
|
|
||||||
|
final List<Node> nodes = new ArrayList<>();
|
||||||
|
|
||||||
|
if (playerInformation.isHuman) {
|
||||||
|
final Button playerToggle = button();
|
||||||
|
playerToggle.setText(AppContext.getString("player"));
|
||||||
|
playerToggle.setOnAction(_ -> {
|
||||||
|
playerInformation.isHuman = false;
|
||||||
|
cleanup();
|
||||||
|
setup();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vbox(playerToggle));
|
||||||
|
} else {
|
||||||
|
final Button computerToggle = button();
|
||||||
|
computerToggle.setText(AppContext.getString("computer"));
|
||||||
|
computerToggle.setOnAction(_ -> {
|
||||||
|
playerInformation.isHuman = true;
|
||||||
|
cleanup();
|
||||||
|
setup();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vbox(computerToggle));
|
||||||
|
|
||||||
|
final Text computerDifficultyText = text();
|
||||||
|
computerDifficultyText.setText(AppContext.getString("computer-difficulty"));
|
||||||
|
|
||||||
|
final Slider computerDifficultySlider = slider();
|
||||||
|
computerDifficultySlider.setMin(0);
|
||||||
|
computerDifficultySlider.setMax(GameInformation.Type.maxDepth(Server.gameToType(game)));
|
||||||
|
computerDifficultySlider.setValue(playerInformation.computerDifficulty);
|
||||||
|
computerDifficultySlider.valueProperty().addListener((_, _, newValue) -> {
|
||||||
|
playerInformation.computerDifficulty = newValue.intValue();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vbox(computerDifficultyText, computerDifficultySlider));
|
||||||
|
}
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(hboxFill(
|
||||||
|
vboxFill(
|
||||||
|
challengeText,
|
||||||
|
challengerHeader,
|
||||||
|
gameText,
|
||||||
|
separator(),
|
||||||
|
|
||||||
|
hboxFill(
|
||||||
|
acceptButton,
|
||||||
|
denyButton
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
nodes.toArray(new Node[0])
|
||||||
|
)
|
||||||
|
))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
101
app/src/main/java/org/toop/app/view/views/CreditsView.java
Normal file
101
app/src/main/java/org/toop/app/view/views/CreditsView.java
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.App;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import javafx.animation.KeyFrame;
|
||||||
|
import javafx.animation.KeyValue;
|
||||||
|
import javafx.animation.Timeline;
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.ScrollPane;
|
||||||
|
import javafx.scene.layout.VBox;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
import javafx.util.Duration;
|
||||||
|
|
||||||
|
public final class CreditsView extends View {
|
||||||
|
public CreditsView() {
|
||||||
|
super(false, "bg-primary");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Text scrumMasterHeader = header();
|
||||||
|
scrumMasterHeader.setText(AppContext.getString("scrum-master") + ": Stef");
|
||||||
|
|
||||||
|
final Text productOwnerHeader = header();
|
||||||
|
productOwnerHeader.setText(AppContext.getString("product-owner") + ": Omar");
|
||||||
|
|
||||||
|
final Text mergeCommanderHeader = header();
|
||||||
|
mergeCommanderHeader.setText(AppContext.getString("merge-commander") + ": Bas");
|
||||||
|
|
||||||
|
final Text localizationHeader = header();
|
||||||
|
localizationHeader.setText(AppContext.getString("localization") + ": Ticho");
|
||||||
|
|
||||||
|
final Text aiHeader = header();
|
||||||
|
aiHeader.setText(AppContext.getString("ai") + ": Michiel");
|
||||||
|
|
||||||
|
final Text developersHeader = header();
|
||||||
|
developersHeader.setText(AppContext.getString("developers") + ": Michiel, Bas, Stef, Omar, Ticho");
|
||||||
|
|
||||||
|
final Text moralSupportHeader = header();
|
||||||
|
moralSupportHeader.setText(AppContext.getString("moral-support") + ": Wesley");
|
||||||
|
|
||||||
|
final Text openglHeader = header();
|
||||||
|
openglHeader.setText(AppContext.getString("opengl") + ": Omar");
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit("credits-fit", vboxFill("credits-container", "credits-container",
|
||||||
|
vbox("credits-spacer-top", ""),
|
||||||
|
|
||||||
|
scrumMasterHeader,
|
||||||
|
productOwnerHeader,
|
||||||
|
mergeCommanderHeader,
|
||||||
|
localizationHeader,
|
||||||
|
aiHeader,
|
||||||
|
developersHeader,
|
||||||
|
moralSupportHeader,
|
||||||
|
openglHeader,
|
||||||
|
|
||||||
|
vbox("credits-spacer-bottom", "")
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
|
final Button backButton = button();
|
||||||
|
backButton.setText(AppContext.getString("back"));
|
||||||
|
backButton.setOnAction(_ -> { ViewStack.pop(); });
|
||||||
|
|
||||||
|
add(Pos.BOTTOM_LEFT,
|
||||||
|
vboxFill(
|
||||||
|
backButton
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
playCredits(100, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void playCredits(int lineHeight, int length) {
|
||||||
|
final ScrollPane creditsFit = get("credits-fit");
|
||||||
|
creditsFit.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
|
||||||
|
creditsFit.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
|
||||||
|
|
||||||
|
final VBox creditsContainer = get("credits-container");
|
||||||
|
creditsContainer.setSpacing(lineHeight);
|
||||||
|
|
||||||
|
final VBox creditsSpacerTop = get("credits-spacer-top");
|
||||||
|
creditsSpacerTop.setMinHeight(App.getHeight() - lineHeight);
|
||||||
|
|
||||||
|
final VBox creditsSpacerBottom = get("credits-spacer-bottom");
|
||||||
|
creditsSpacerBottom.setMinHeight(App.getHeight() - lineHeight);
|
||||||
|
|
||||||
|
final Timeline timeline = new Timeline(
|
||||||
|
new KeyFrame(Duration.seconds(0), new KeyValue(creditsFit.vvalueProperty(), 0.0)),
|
||||||
|
new KeyFrame(Duration.seconds(length), new KeyValue(creditsFit.vvalueProperty(), 1.0))
|
||||||
|
);
|
||||||
|
|
||||||
|
timeline.setCycleCount(Timeline.INDEFINITE);
|
||||||
|
timeline.play();
|
||||||
|
}
|
||||||
|
}
|
||||||
45
app/src/main/java/org/toop/app/view/views/ErrorView.java
Normal file
45
app/src/main/java/org/toop/app/view/views/ErrorView.java
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
|
||||||
|
public final class ErrorView extends View {
|
||||||
|
private final String error;
|
||||||
|
|
||||||
|
public ErrorView(String error) {
|
||||||
|
super(false, "bg-popup");
|
||||||
|
this.error = error;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Text errorHeader = header();
|
||||||
|
errorHeader.setText(AppContext.getString("error"));
|
||||||
|
|
||||||
|
final Text errorText = text();
|
||||||
|
errorText.setText(error);
|
||||||
|
|
||||||
|
final Button okButton = button();
|
||||||
|
okButton.setText(AppContext.getString("ok"));
|
||||||
|
okButton.setOnAction(_ -> { ViewStack.pop(); });
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
vboxFill(
|
||||||
|
errorHeader,
|
||||||
|
separator(),
|
||||||
|
|
||||||
|
vspacer(),
|
||||||
|
errorText,
|
||||||
|
vspacer(),
|
||||||
|
|
||||||
|
separator(),
|
||||||
|
okButton
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
135
app/src/main/java/org/toop/app/view/views/GameView.java
Normal file
135
app/src/main/java/org/toop/app/view/views/GameView.java
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
public final class GameView extends View {
|
||||||
|
private static class GameOverView extends View {
|
||||||
|
private final boolean iWon;
|
||||||
|
private final String winner;
|
||||||
|
|
||||||
|
public GameOverView(boolean iWon, String winner) {
|
||||||
|
super(false, "bg-popup");
|
||||||
|
|
||||||
|
this.iWon = iWon;
|
||||||
|
this.winner = winner;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Text gameOverHeader = header();
|
||||||
|
gameOverHeader.setText(AppContext.getString("game-over"));
|
||||||
|
|
||||||
|
final Button okButton = button();
|
||||||
|
okButton.setText(AppContext.getString("ok"));
|
||||||
|
okButton.setOnAction(_ -> { ViewStack.pop(); });
|
||||||
|
|
||||||
|
Text gameOverText = text();
|
||||||
|
|
||||||
|
if (winner.isEmpty()) {
|
||||||
|
gameOverText.setText(AppContext.getString("the-game-ended-in-a-draw"));
|
||||||
|
} else {
|
||||||
|
if (iWon) {
|
||||||
|
gameOverText.setText(AppContext.getString("you-win") + " " + winner);
|
||||||
|
} else {
|
||||||
|
gameOverText.setText(AppContext.getString("you-lost-against") + " " + winner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(vboxFill(
|
||||||
|
gameOverHeader,
|
||||||
|
separator(),
|
||||||
|
|
||||||
|
vspacer(),
|
||||||
|
gameOverText,
|
||||||
|
vspacer(),
|
||||||
|
|
||||||
|
separator(),
|
||||||
|
okButton
|
||||||
|
))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private final Button forfeitButton;
|
||||||
|
private final Button exitButton;
|
||||||
|
|
||||||
|
private final Text currentPlayerHeader;
|
||||||
|
private final Text currentMoveHeader;
|
||||||
|
|
||||||
|
private final Text nextPlayerHeader;
|
||||||
|
|
||||||
|
public GameView(Runnable onForfeit, Runnable onExit) {
|
||||||
|
assert onExit != null;
|
||||||
|
|
||||||
|
super(true, "bg-primary");
|
||||||
|
|
||||||
|
if (onForfeit != null) {
|
||||||
|
forfeitButton = button();
|
||||||
|
forfeitButton.setText(AppContext.getString("forfeit"));
|
||||||
|
forfeitButton.setOnAction(_ -> onForfeit.run());
|
||||||
|
} else {
|
||||||
|
forfeitButton = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
exitButton = button();
|
||||||
|
exitButton.setText(AppContext.getString("exit"));
|
||||||
|
exitButton.setOnAction(_ -> onExit.run());
|
||||||
|
|
||||||
|
currentPlayerHeader = header("", "current-player");
|
||||||
|
currentMoveHeader = header();
|
||||||
|
|
||||||
|
nextPlayerHeader = header();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
add(Pos.TOP_RIGHT,
|
||||||
|
fit(vboxFill(
|
||||||
|
currentPlayerHeader,
|
||||||
|
|
||||||
|
hboxFill(
|
||||||
|
separator(),
|
||||||
|
currentMoveHeader,
|
||||||
|
separator()
|
||||||
|
),
|
||||||
|
|
||||||
|
nextPlayerHeader
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
|
add(Pos.BOTTOM_LEFT,
|
||||||
|
vboxFill(
|
||||||
|
forfeitButton,
|
||||||
|
exitButton
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void nextPlayer(boolean isMe, String currentPlayer, String currentMove, String nextPlayer) {
|
||||||
|
currentPlayerHeader.setText(currentPlayer);
|
||||||
|
currentMoveHeader.setText(currentMove);
|
||||||
|
|
||||||
|
nextPlayerHeader.setText(nextPlayer);
|
||||||
|
|
||||||
|
if (isMe) {
|
||||||
|
currentPlayerHeader.getStyleClass().add("my-turn");
|
||||||
|
} else {
|
||||||
|
currentPlayerHeader.getStyleClass().remove("my-turn");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateChat(String player, String message) {
|
||||||
|
// Todo
|
||||||
|
}
|
||||||
|
|
||||||
|
public void gameOver(boolean iWon, String winner) {
|
||||||
|
ViewStack.push(new GameOverView(iWon, winner));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.GameInformation;
|
||||||
|
import org.toop.app.game.TicTacToeGame;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.Slider;
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.scene.layout.VBox;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public final class LocalMultiplayerView extends View {
|
||||||
|
private final GameInformation information;
|
||||||
|
|
||||||
|
public LocalMultiplayerView(GameInformation information) {
|
||||||
|
super(true, "bg-primary");
|
||||||
|
this.information = information;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalMultiplayerView(GameInformation.Type type) {
|
||||||
|
this(new GameInformation(type));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Button playButton = button();
|
||||||
|
playButton.setText(AppContext.getString("play"));
|
||||||
|
playButton.setOnAction(_ -> {
|
||||||
|
for (final GameInformation.Player player : information.players) {
|
||||||
|
if (player.name.isEmpty()) {
|
||||||
|
ViewStack.push(new ErrorView(AppContext.getString("please-enter-your-name")));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (information.type) {
|
||||||
|
case TICTACTOE: new TicTacToeGame(information, 0, null, null);
|
||||||
|
case REVERSI: break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(vboxFill(
|
||||||
|
hbox(
|
||||||
|
setupPlayers()
|
||||||
|
),
|
||||||
|
|
||||||
|
separator(),
|
||||||
|
playButton
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
|
final Button backButton = button();
|
||||||
|
backButton.setText(AppContext.getString("back"));
|
||||||
|
backButton.setOnAction(_ -> { ViewStack.push(new MainView()); });
|
||||||
|
|
||||||
|
add(Pos.BOTTOM_LEFT,
|
||||||
|
vboxFill(
|
||||||
|
backButton
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private VBox[] setupPlayers() {
|
||||||
|
final VBox[] playerBoxes = new VBox[GameInformation.Type.playerCount(information.type)];
|
||||||
|
|
||||||
|
for (int i = 0; i < playerBoxes.length; i++) {
|
||||||
|
final int index = i;
|
||||||
|
|
||||||
|
List<Node> nodes = new ArrayList<>();
|
||||||
|
|
||||||
|
final Text playerHeader = header();
|
||||||
|
playerHeader.setText(AppContext.getString("player") + " #" + (i + 1));
|
||||||
|
|
||||||
|
nodes.add(playerHeader);
|
||||||
|
nodes.add(separator());
|
||||||
|
|
||||||
|
final Text nameText = text();
|
||||||
|
nameText.setText(AppContext.getString("name"));
|
||||||
|
|
||||||
|
if (information.players[i].isHuman) {
|
||||||
|
final Button playerToggle = button();
|
||||||
|
playerToggle.setText(AppContext.getString("player"));
|
||||||
|
playerToggle.setOnAction(_ -> {
|
||||||
|
information.players[index].isHuman = false;
|
||||||
|
cleanup();
|
||||||
|
setup();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vboxFill(playerToggle));
|
||||||
|
|
||||||
|
final TextField playerNameInput = input();
|
||||||
|
playerNameInput.setPromptText(AppContext.getString("enter-your-name"));
|
||||||
|
playerNameInput.setText(information.players[i].name);
|
||||||
|
playerNameInput.textProperty().addListener((_, _, newValue) -> {
|
||||||
|
information.players[index].name = newValue;
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vboxFill(nameText, playerNameInput));
|
||||||
|
} else {
|
||||||
|
final Button computerToggle = button();
|
||||||
|
computerToggle.setText(AppContext.getString("computer"));
|
||||||
|
computerToggle.setOnAction(_ -> {
|
||||||
|
information.players[index].isHuman = true;
|
||||||
|
cleanup();
|
||||||
|
setup();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vboxFill(computerToggle));
|
||||||
|
|
||||||
|
information.players[i].name = "Pism Bot V" + i;
|
||||||
|
|
||||||
|
final Text computerNameText = text();
|
||||||
|
computerNameText.setText(information.players[index].name);
|
||||||
|
|
||||||
|
nodes.add(vboxFill(nameText, computerNameText));
|
||||||
|
|
||||||
|
final Text computerDifficultyText = text();
|
||||||
|
computerDifficultyText.setText(AppContext.getString("computer-difficulty"));
|
||||||
|
|
||||||
|
final Slider computerDifficultySlider = slider();
|
||||||
|
computerDifficultySlider.setMin(0);
|
||||||
|
computerDifficultySlider.setMax(GameInformation.Type.maxDepth(information.type));
|
||||||
|
computerDifficultySlider.setValue(information.players[i].computerDifficulty);
|
||||||
|
computerDifficultySlider.valueProperty().addListener((_, _, newValue) -> {
|
||||||
|
information.players[index].computerDifficulty = newValue.intValue();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vboxFill(computerDifficultyText, computerDifficultySlider));
|
||||||
|
|
||||||
|
final Text computerThinkTimeText = text();
|
||||||
|
computerThinkTimeText.setText(AppContext.getString("computer-think-time"));
|
||||||
|
|
||||||
|
final Slider computerThinkTimeSlider = slider();
|
||||||
|
computerThinkTimeSlider.setMin(0);
|
||||||
|
computerThinkTimeSlider.setMax(5);
|
||||||
|
computerThinkTimeSlider.setValue(information.players[i].computerThinkTime);
|
||||||
|
computerThinkTimeSlider.valueProperty().addListener((_, _, newValue) -> {
|
||||||
|
information.players[index].computerThinkTime = newValue.intValue();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vboxFill(computerThinkTimeText, computerThinkTimeSlider));
|
||||||
|
}
|
||||||
|
|
||||||
|
playerBoxes[i] = vboxFill(nodes.toArray(new Node[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
return playerBoxes;
|
||||||
|
}
|
||||||
|
}
|
||||||
43
app/src/main/java/org/toop/app/view/views/LocalView.java
Normal file
43
app/src/main/java/org/toop/app/view/views/LocalView.java
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.GameInformation;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
|
||||||
|
public final class LocalView extends View {
|
||||||
|
public LocalView() {
|
||||||
|
super(true, "bg-primary");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Button ticTacToeButton = button();
|
||||||
|
ticTacToeButton.setText(AppContext.getString("tic-tac-toe"));
|
||||||
|
ticTacToeButton.setOnAction(_ -> { ViewStack.push(new LocalMultiplayerView(GameInformation.Type.TICTACTOE)); });
|
||||||
|
|
||||||
|
final Button reversiButton = button();
|
||||||
|
reversiButton.setText(AppContext.getString("reversi"));
|
||||||
|
reversiButton.setOnAction(_ -> {});
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(vboxFill(
|
||||||
|
ticTacToeButton,
|
||||||
|
reversiButton
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
|
final Button backButton = button();
|
||||||
|
backButton.setText(AppContext.getString("back"));
|
||||||
|
backButton.setOnAction(_ -> { ViewStack.push(new MainView()); });
|
||||||
|
|
||||||
|
add(Pos.BOTTOM_LEFT,
|
||||||
|
vboxFill(
|
||||||
|
backButton
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
48
app/src/main/java/org/toop/app/view/views/MainView.java
Normal file
48
app/src/main/java/org/toop/app/view/views/MainView.java
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.App;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
|
||||||
|
public final class MainView extends View {
|
||||||
|
public MainView() {
|
||||||
|
super(true, "bg-primary");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Button localButton = button();
|
||||||
|
localButton.setText(AppContext.getString("local"));
|
||||||
|
localButton.setOnAction(_ -> { ViewStack.push(new LocalView()); });
|
||||||
|
|
||||||
|
final Button onlineButton = button();
|
||||||
|
onlineButton.setText(AppContext.getString("online"));
|
||||||
|
onlineButton.setOnAction(_ -> { ViewStack.push(new OnlineView()); });
|
||||||
|
|
||||||
|
final Button creditsButton = button();
|
||||||
|
creditsButton.setText(AppContext.getString("credits"));
|
||||||
|
creditsButton.setOnAction(_ -> { ViewStack.push(new CreditsView()); });
|
||||||
|
|
||||||
|
final Button optionsButton = button();
|
||||||
|
optionsButton.setText(AppContext.getString("options"));
|
||||||
|
optionsButton.setOnAction(_ -> { ViewStack.push(new OptionsView()); });
|
||||||
|
|
||||||
|
final Button quitButton = button();
|
||||||
|
quitButton.setText(AppContext.getString("quit"));
|
||||||
|
quitButton.setOnAction(_ -> { App.startQuit(); });
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(vboxFill(
|
||||||
|
localButton,
|
||||||
|
onlineButton,
|
||||||
|
creditsButton,
|
||||||
|
optionsButton,
|
||||||
|
quitButton
|
||||||
|
))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
83
app/src/main/java/org/toop/app/view/views/OnlineView.java
Normal file
83
app/src/main/java/org/toop/app/view/views/OnlineView.java
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.Server;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
|
||||||
|
public class OnlineView extends View {
|
||||||
|
public OnlineView() {
|
||||||
|
super(true, "bg-primary");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Text serverInformationHeader = header();
|
||||||
|
serverInformationHeader.setText(AppContext.getString("server-information"));
|
||||||
|
|
||||||
|
final Text serverIPText = text();
|
||||||
|
serverIPText.setText(AppContext.getString("ip-address"));
|
||||||
|
|
||||||
|
final TextField serverIPInput = input();
|
||||||
|
serverIPInput.setPromptText(AppContext.getString("enter-the-server-ip"));
|
||||||
|
|
||||||
|
final Text serverPortText = text();
|
||||||
|
serverPortText.setText(AppContext.getString("port"));
|
||||||
|
|
||||||
|
final TextField serverPortInput = input();
|
||||||
|
serverPortInput.setPromptText(AppContext.getString("enter-the-server-port"));
|
||||||
|
|
||||||
|
final Text playerNameText = text();
|
||||||
|
playerNameText.setText(AppContext.getString("player-name"));
|
||||||
|
|
||||||
|
final TextField playerNameInput = input();
|
||||||
|
playerNameInput.setPromptText(AppContext.getString("enter-your-name"));
|
||||||
|
|
||||||
|
final Button connectButton = button();
|
||||||
|
connectButton.setText(AppContext.getString("connect"));
|
||||||
|
connectButton.setOnAction(_ -> {
|
||||||
|
new Server(serverIPInput.getText(), serverPortInput.getText(), playerNameInput.getText());
|
||||||
|
});
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(vboxFill(
|
||||||
|
serverInformationHeader,
|
||||||
|
separator(),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
serverIPText,
|
||||||
|
serverIPInput
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
serverPortText,
|
||||||
|
serverPortInput
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
playerNameText,
|
||||||
|
playerNameInput
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
connectButton
|
||||||
|
)
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
|
final Button backButton = button();
|
||||||
|
backButton.setText(AppContext.getString("back"));
|
||||||
|
backButton.setOnAction(_ -> { ViewStack.push(new MainView()); });
|
||||||
|
|
||||||
|
add(Pos.BOTTOM_LEFT,
|
||||||
|
vboxFill(
|
||||||
|
backButton
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
249
app/src/main/java/org/toop/app/view/views/OptionsView.java
Normal file
249
app/src/main/java/org/toop/app/view/views/OptionsView.java
Normal file
@@ -0,0 +1,249 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.App;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
import org.toop.framework.audio.events.AudioEvents;
|
||||||
|
import org.toop.framework.eventbus.EventFlow;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
import org.toop.local.AppSettings;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.ComboBox;
|
||||||
|
import javafx.scene.control.Slider;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
import javafx.util.StringConverter;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public final class OptionsView extends View {
|
||||||
|
public OptionsView() {
|
||||||
|
super(false, "bg-secondary");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Text generalHeader = header();
|
||||||
|
generalHeader.setText(AppContext.getString("general"));
|
||||||
|
|
||||||
|
final Text volumeHeader = header();
|
||||||
|
volumeHeader.setText(AppContext.getString("volume"));
|
||||||
|
|
||||||
|
final Text styleHeader = header();
|
||||||
|
styleHeader.setText(AppContext.getString("style"));
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(hboxFill(
|
||||||
|
vboxFill(
|
||||||
|
generalHeader,
|
||||||
|
separator(),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
text("language-text"),
|
||||||
|
combobox("language-combobox")
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
button("fullscreen-button")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
volumeHeader,
|
||||||
|
separator(),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
text("master-volume-text"),
|
||||||
|
slider("master-volume-slider")
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
text("effects-volume-text"),
|
||||||
|
slider("effects-volume-slider")
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
text("music-volume-text"),
|
||||||
|
slider("music-volume-slider")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
styleHeader,
|
||||||
|
separator(),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
text("theme-text"),
|
||||||
|
combobox("theme-combobox")
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
text("layout-text"),
|
||||||
|
combobox("layout-combobox")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
|
setupLanguageOption();
|
||||||
|
setupMasterVolumeOption();
|
||||||
|
setupEffectsVolumeOption();
|
||||||
|
setupMusicVolumeOption();
|
||||||
|
setupThemeOption();
|
||||||
|
setupLayoutOption();
|
||||||
|
setupFullscreenOption();
|
||||||
|
|
||||||
|
final Button backButton = button();
|
||||||
|
backButton.setText(AppContext.getString("back"));
|
||||||
|
backButton.setOnAction(_ -> { ViewStack.pop(); });
|
||||||
|
|
||||||
|
add(Pos.BOTTOM_LEFT,
|
||||||
|
vboxFill(
|
||||||
|
backButton
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupLanguageOption() {
|
||||||
|
final Text languageText = get("language-text");
|
||||||
|
languageText.setText(AppContext.getString("language"));
|
||||||
|
|
||||||
|
final ComboBox<Locale> languageCombobox = get("language-combobox");
|
||||||
|
languageCombobox.getItems().addAll(AppContext.getLocalization().getAvailableLocales());
|
||||||
|
languageCombobox.setValue(AppContext.getLocale());
|
||||||
|
|
||||||
|
languageCombobox.getSelectionModel().selectedItemProperty().addListener((_, _, newValue) -> {
|
||||||
|
AppSettings.getSettings().setLocale(newValue.toString());
|
||||||
|
AppContext.setLocale(newValue);
|
||||||
|
App.reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
languageCombobox.setConverter(new StringConverter<>() {
|
||||||
|
@Override
|
||||||
|
public String toString(Locale locale) {
|
||||||
|
return AppContext.getString(locale.getDisplayName().toLowerCase());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Locale fromString(String s) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupMasterVolumeOption() {
|
||||||
|
final Text masterVolumeText = get("master-volume-text");
|
||||||
|
masterVolumeText.setText(AppContext.getString("master-volume"));
|
||||||
|
|
||||||
|
final Slider masterVolumeSlider = get("master-volume-slider");
|
||||||
|
masterVolumeSlider.setMin(0);
|
||||||
|
masterVolumeSlider.setMax(100);
|
||||||
|
masterVolumeSlider.setValue(AppSettings.getSettings().getVolume());
|
||||||
|
|
||||||
|
masterVolumeSlider.valueProperty().addListener((_, _, newValue) -> {
|
||||||
|
AppSettings.getSettings().setVolume(newValue.intValue());
|
||||||
|
new EventFlow().addPostEvent(new AudioEvents.ChangeVolume(newValue.doubleValue())).asyncPostEvent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupEffectsVolumeOption() {
|
||||||
|
final Text effectsVolumeText = get("effects-volume-text");
|
||||||
|
effectsVolumeText.setText(AppContext.getString("effects-volume"));
|
||||||
|
|
||||||
|
final Slider effectsVolumeSlider = get("effects-volume-slider");
|
||||||
|
effectsVolumeSlider.setMin(0);
|
||||||
|
effectsVolumeSlider.setMax(100);
|
||||||
|
effectsVolumeSlider.setValue(AppSettings.getSettings().getFxVolume());
|
||||||
|
|
||||||
|
effectsVolumeSlider.valueProperty().addListener((_, _, newValue) -> {
|
||||||
|
AppSettings.getSettings().setFxVolume(newValue.intValue());
|
||||||
|
new EventFlow().addPostEvent(new AudioEvents.ChangeFxVolume(newValue.doubleValue())).asyncPostEvent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupMusicVolumeOption() {
|
||||||
|
final Text musicVolumeText = get("music-volume-text");
|
||||||
|
musicVolumeText.setText(AppContext.getString("music-volume"));
|
||||||
|
|
||||||
|
final Slider musicVolumeSlider = get("music-volume-slider");
|
||||||
|
musicVolumeSlider.setMin(0);
|
||||||
|
musicVolumeSlider.setMax(100);
|
||||||
|
musicVolumeSlider.setValue(AppSettings.getSettings().getMusicVolume());
|
||||||
|
|
||||||
|
musicVolumeSlider.valueProperty().addListener((_, _, newValue) -> {
|
||||||
|
AppSettings.getSettings().setMusicVolume(newValue.intValue());
|
||||||
|
new EventFlow().addPostEvent(new AudioEvents.ChangeMusicVolume(newValue.doubleValue())).asyncPostEvent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupThemeOption() {
|
||||||
|
final Text themeText = get("theme-text");
|
||||||
|
themeText.setText(AppContext.getString("theme"));
|
||||||
|
|
||||||
|
final ComboBox<String> themeCombobox = get("theme-combobox");
|
||||||
|
themeCombobox.getItems().addAll("dark", "light", "high-contrast");
|
||||||
|
themeCombobox.setValue(AppSettings.getSettings().getTheme());
|
||||||
|
|
||||||
|
themeCombobox.getSelectionModel().selectedItemProperty().addListener((_, _, newValue) -> {
|
||||||
|
AppSettings.getSettings().setTheme(newValue);
|
||||||
|
App.setStyle(newValue, AppSettings.getSettings().getLayoutSize());
|
||||||
|
});
|
||||||
|
|
||||||
|
themeCombobox.setConverter(new StringConverter<>() {
|
||||||
|
@Override
|
||||||
|
public String toString(String theme) {
|
||||||
|
return AppContext.getString(theme);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String fromString(String s) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupLayoutOption() {
|
||||||
|
final Text layoutText = get("layout-text");
|
||||||
|
layoutText.setText(AppContext.getString("layout-size"));
|
||||||
|
|
||||||
|
final ComboBox<String> layoutCombobox = get("layout-combobox");
|
||||||
|
layoutCombobox.getItems().addAll("small", "medium", "large");
|
||||||
|
layoutCombobox.setValue(AppSettings.getSettings().getLayoutSize());
|
||||||
|
|
||||||
|
layoutCombobox.getSelectionModel().selectedItemProperty().addListener((_, _, newValue) -> {
|
||||||
|
AppSettings.getSettings().setLayoutSize(newValue);
|
||||||
|
App.setStyle(AppSettings.getSettings().getTheme(), newValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
layoutCombobox.setConverter(new StringConverter<>() {
|
||||||
|
@Override
|
||||||
|
public String toString(String layout) {
|
||||||
|
return AppContext.getString(layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String fromString(String s) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupFullscreenOption() {
|
||||||
|
final Button fullscreenButton = get("fullscreen-button");
|
||||||
|
|
||||||
|
if (AppSettings.getSettings().getFullscreen()) {
|
||||||
|
fullscreenButton.setText(AppContext.getString("windowed"));
|
||||||
|
fullscreenButton.setOnAction(_ -> {
|
||||||
|
AppSettings.getSettings().setFullscreen(false);
|
||||||
|
App.setFullscreen(false);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
fullscreenButton.setText(AppContext.getString("fullscreen"));
|
||||||
|
fullscreenButton.setOnAction(_ -> {
|
||||||
|
AppSettings.getSettings().setFullscreen(true);
|
||||||
|
App.setFullscreen(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
40
app/src/main/java/org/toop/app/view/views/QuitView.java
Normal file
40
app/src/main/java/org/toop/app/view/views/QuitView.java
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.App;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
|
||||||
|
public final class QuitView extends View {
|
||||||
|
public QuitView() {
|
||||||
|
super(false, "bg-popup");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Text sureHeader = header();
|
||||||
|
sureHeader.setText(AppContext.getString("are-you-sure"));
|
||||||
|
|
||||||
|
final Button yesButton = button();
|
||||||
|
yesButton.setText(AppContext.getString("yes"));
|
||||||
|
yesButton.setOnAction(_ -> { App.quit(); });
|
||||||
|
|
||||||
|
final Button noButton = button();
|
||||||
|
noButton.setText(AppContext.getString("no"));
|
||||||
|
noButton.setOnAction(_ -> { App.stopQuit(); });
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(vbox(
|
||||||
|
sureHeader,
|
||||||
|
|
||||||
|
hbox(
|
||||||
|
yesButton,
|
||||||
|
noButton
|
||||||
|
)
|
||||||
|
))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
118
app/src/main/java/org/toop/app/view/views/SendChallengeView.java
Normal file
118
app/src/main/java/org/toop/app/view/views/SendChallengeView.java
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import org.toop.app.GameInformation;
|
||||||
|
import org.toop.app.Server;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.ComboBox;
|
||||||
|
import javafx.scene.control.Slider;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.BiConsumer;
|
||||||
|
|
||||||
|
public final class SendChallengeView extends View {
|
||||||
|
private final Server server;
|
||||||
|
private final String opponent;
|
||||||
|
private final BiConsumer<GameInformation.Player, String> onSend;
|
||||||
|
|
||||||
|
private final GameInformation.Player playerInformation;
|
||||||
|
|
||||||
|
public SendChallengeView(Server server, String opponent, BiConsumer<GameInformation.Player, String> onSend) {
|
||||||
|
super(true, "bg-popup");
|
||||||
|
|
||||||
|
this.server = server;
|
||||||
|
this.opponent = opponent;
|
||||||
|
this.onSend = onSend;
|
||||||
|
|
||||||
|
playerInformation = new GameInformation.Player();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Text challengeText = text();
|
||||||
|
challengeText.setText(AppContext.getString("challenge"));
|
||||||
|
|
||||||
|
final Text opponentHeader = header();
|
||||||
|
opponentHeader.setText(opponent);
|
||||||
|
|
||||||
|
final Text gameText = text();
|
||||||
|
gameText.setText(AppContext.getString("to-a-game-of"));
|
||||||
|
|
||||||
|
final ComboBox<String> gamesCombobox = combobox();
|
||||||
|
gamesCombobox.getItems().addAll(server.getGamesList());
|
||||||
|
gamesCombobox.setValue(gamesCombobox.getItems().getFirst());
|
||||||
|
|
||||||
|
final Button sendButton = button();
|
||||||
|
sendButton.setText(AppContext.getString("send"));
|
||||||
|
sendButton.setOnAction(_ -> { onSend.accept(playerInformation, gamesCombobox.getValue()); });
|
||||||
|
|
||||||
|
final Button cancelButton = button();
|
||||||
|
cancelButton.setText(AppContext.getString("cancel"));
|
||||||
|
cancelButton.setOnAction(_ -> { ViewStack.pop(); });
|
||||||
|
|
||||||
|
final List<Node> nodes = new ArrayList<>();
|
||||||
|
|
||||||
|
if (playerInformation.isHuman) {
|
||||||
|
final Button playerToggle = button();
|
||||||
|
playerToggle.setText(AppContext.getString("player"));
|
||||||
|
playerToggle.setOnAction(_ -> {
|
||||||
|
playerInformation.isHuman = false;
|
||||||
|
cleanup();
|
||||||
|
setup();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vbox(playerToggle));
|
||||||
|
} else {
|
||||||
|
final Button computerToggle = button();
|
||||||
|
computerToggle.setText(AppContext.getString("computer"));
|
||||||
|
computerToggle.setOnAction(_ -> {
|
||||||
|
playerInformation.isHuman = true;
|
||||||
|
cleanup();
|
||||||
|
setup();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vbox(computerToggle));
|
||||||
|
|
||||||
|
final Text computerDifficultyText = text();
|
||||||
|
computerDifficultyText.setText(AppContext.getString("computer-difficulty"));
|
||||||
|
|
||||||
|
final Slider computerDifficultySlider = slider();
|
||||||
|
computerDifficultySlider.setMin(0);
|
||||||
|
computerDifficultySlider.setMax(GameInformation.Type.maxDepth(Server.gameToType(gamesCombobox.getValue())));
|
||||||
|
computerDifficultySlider.setValue(playerInformation.computerDifficulty);
|
||||||
|
computerDifficultySlider.valueProperty().addListener((_, _, newValue) -> {
|
||||||
|
playerInformation.computerDifficulty = newValue.intValue();
|
||||||
|
});
|
||||||
|
|
||||||
|
nodes.add(vbox(computerDifficultyText, computerDifficultySlider));
|
||||||
|
}
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(hboxFill(
|
||||||
|
vboxFill(
|
||||||
|
challengeText,
|
||||||
|
opponentHeader,
|
||||||
|
gameText,
|
||||||
|
gamesCombobox,
|
||||||
|
separator(),
|
||||||
|
|
||||||
|
hboxFill(
|
||||||
|
sendButton,
|
||||||
|
cancelButton
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
vboxFill(
|
||||||
|
nodes.toArray(new Node[0])
|
||||||
|
)
|
||||||
|
))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
80
app/src/main/java/org/toop/app/view/views/ServerView.java
Normal file
80
app/src/main/java/org/toop/app/view/views/ServerView.java
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
package org.toop.app.view.views;
|
||||||
|
|
||||||
|
import javafx.application.Platform;
|
||||||
|
import org.toop.app.view.View;
|
||||||
|
import org.toop.app.view.ViewStack;
|
||||||
|
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.ListView;
|
||||||
|
import javafx.scene.text.Text;
|
||||||
|
import org.toop.local.AppContext;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
public final class ServerView extends View {
|
||||||
|
private final String user;
|
||||||
|
private final Consumer<String> onPlayerClicked;
|
||||||
|
private final Runnable onDisconnect;
|
||||||
|
|
||||||
|
private ListView<Button> listView;
|
||||||
|
|
||||||
|
public ServerView(String user, Consumer<String> onPlayerClicked, Runnable onDisconnect) {
|
||||||
|
super(true, "bg-primary");
|
||||||
|
|
||||||
|
this.user = user;
|
||||||
|
this.onPlayerClicked = onPlayerClicked;
|
||||||
|
this.onDisconnect = onDisconnect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(List<String> players) {
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
listView.getItems().clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < players.size(); i++) {
|
||||||
|
final int finalI = i;
|
||||||
|
|
||||||
|
final Button button = button();
|
||||||
|
button.setText(players.get(i));
|
||||||
|
button.setOnAction(_ -> {
|
||||||
|
onPlayerClicked.accept(players.get(finalI));
|
||||||
|
});
|
||||||
|
|
||||||
|
listView.getItems().add(button);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
final Text playerHeader = header();
|
||||||
|
playerHeader.setText(user);
|
||||||
|
|
||||||
|
listView = new ListView<Button>();
|
||||||
|
|
||||||
|
add(Pos.CENTER,
|
||||||
|
fit(vboxFill(
|
||||||
|
vbox(
|
||||||
|
playerHeader,
|
||||||
|
separator()
|
||||||
|
),
|
||||||
|
|
||||||
|
listView
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
|
final Button disconnectButton = button();
|
||||||
|
disconnectButton.setText(AppContext.getString("disconnect"));
|
||||||
|
disconnectButton.setOnAction(_ -> {
|
||||||
|
onDisconnect.run();
|
||||||
|
ViewStack.push(new OnlineView());
|
||||||
|
});
|
||||||
|
|
||||||
|
add(Pos.BOTTOM_LEFT,
|
||||||
|
vboxFill(
|
||||||
|
disconnectButton
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package org.toop.local;
|
package org.toop.local;
|
||||||
|
|
||||||
import jdk.jfr.Event;
|
|
||||||
import org.toop.app.App;
|
import org.toop.app.App;
|
||||||
import org.toop.framework.asset.resources.SettingsAsset;
|
import org.toop.framework.asset.resources.SettingsAsset;
|
||||||
import org.toop.framework.audio.events.AudioEvents;
|
import org.toop.framework.audio.events.AudioEvents;
|
||||||
@@ -11,10 +10,9 @@ import java.io.File;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
public class AppSettings {
|
public class AppSettings {
|
||||||
|
private static SettingsAsset settingsAsset;
|
||||||
|
|
||||||
private SettingsAsset settingsAsset;
|
public static void applySettings() {
|
||||||
|
|
||||||
public void applySettings() {
|
|
||||||
SettingsAsset settings = getPath();
|
SettingsAsset settings = getPath();
|
||||||
if (!settings.isLoaded()) {
|
if (!settings.isLoaded()) {
|
||||||
settings.load();
|
settings.load();
|
||||||
@@ -29,8 +27,8 @@ public class AppSettings {
|
|||||||
App.setStyle(settingsAsset.getTheme(), settingsAsset.getLayoutSize());
|
App.setStyle(settingsAsset.getTheme(), settingsAsset.getLayoutSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
public SettingsAsset getPath() {
|
public static SettingsAsset getPath() {
|
||||||
if (this.settingsAsset == null) {
|
if (settingsAsset == null) {
|
||||||
String os = System.getProperty("os.name").toLowerCase();
|
String os = System.getProperty("os.name").toLowerCase();
|
||||||
String basePath;
|
String basePath;
|
||||||
|
|
||||||
@@ -46,8 +44,13 @@ public class AppSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
File settingsFile = new File(basePath + File.separator + "ISY1" + File.separator + "settings.json");
|
File settingsFile = new File(basePath + File.separator + "ISY1" + File.separator + "settings.json");
|
||||||
this.settingsAsset = new SettingsAsset(settingsFile);
|
settingsAsset = new SettingsAsset(settingsFile);
|
||||||
}
|
}
|
||||||
return this.settingsAsset;
|
return settingsAsset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SettingsAsset getSettings() {
|
||||||
|
assert settingsAsset != null;
|
||||||
|
return settingsAsset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
|
accept=\u0642\u0628\u0648\u0644
|
||||||
ai=\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0635\u0646\u0627\u0639\u064a
|
ai=\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0635\u0646\u0627\u0639\u064a
|
||||||
appTitle=\u0645\u062e\u062a\u0627\u0631 \u0623\u0644\u0639\u0627\u0628 ISY
|
app-title=\u0645\u062e\u062a\u0627\u0631 \u0627\u0644\u0643\u0627\u0645 \u0627\u0644\u0645\u062e\u062a\u0627\u0631
|
||||||
back=\u0631\u062c\u0648\u0639
|
are-you-sure=\u0647\u0644 \u0623\u0646\u062a \u0645\u062a\u0623\u0643\u062f?
|
||||||
backToMainMenu=\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629
|
back=\u0627\u0644\u0631\u062c\u0648\u0639
|
||||||
computer=\u0627\u0644\u062d\u0627\u0633\u0648\u0628
|
cancel=\u0625\u0644\u063a\u0627\u0621
|
||||||
computerDifficulty=\u0635\u0639\u0648\u0628\u0629 \u0627\u0644\u062d\u0627\u0633\u0648\u0628
|
challenge=\u062a\u062d\u062f\u064a
|
||||||
computerThinkTime=\u0632\u0645\u0646 \u062a\u0641\u0643\u064a\u0631 \u0627\u0644\u0643\u0645\u0628\u064a\u0648\u062a\u0631
|
computer-difficulty=\u0635\u0639\u0648\u0628 \u0627\u0644\u0643\u0645\u0628\u064a\u0648\u062a\u0631
|
||||||
congratulations=\u0645\u0628\u0631\u0648\u0643
|
computer-think-time=\u0648\u0642\u062a \u062a\u0641\u0643\u064a\u0631 \u0627\u0644\u0643\u0645\u0628\u064a\u0648\u062a\u0631
|
||||||
connect=\u0627\u062a\u0635\u0644
|
computer=\u0643\u0645\u0628\u064a\u0648\u062a\u0631
|
||||||
connectionType=\u0646\u0648\u0639 \u0627\u0644\u0627\u062A\u0635\u0627\u0644
|
connect=\u0627\u062a\u0635\u0627\u0644
|
||||||
credits=\u0627\u0644\u0634\u0643\u0631 \u0648\u0627\u0644\u062a\u0642\u062f\u064a\u0631
|
credits=\u0627\u0644\u0645\u0633\u0627\u0647\u0645\u0629
|
||||||
dark-hc=\u063A\u0627\u0645\u0642 (\u062A\u0646\u0627\u0642\u0636 \u0639\u0627\u0644\u064D)
|
dark=\u0638\u0644\u0627\u0645
|
||||||
dark=\u063A\u0627\u0645\u0642
|
deny=\u0631\u0641\u0636
|
||||||
developers=\u0627\u0644\u0645\u0637\u0648\u0631\u0648\u0646
|
developers=\u0627\u0644\u0645\u0637\u0648\u0631\u0648\u0646
|
||||||
drawText=\u0627\u0646\u062A\u0647\u062A \u0627\u0644\u0644\u0639\u0628\u0629 \u0628\u062A\u0639\u0627\u062F\u0644
|
disconnect=\u0641\u0635\u0644 \u0627\u0644\u0627\u062a\u0635\u0627\u0644
|
||||||
effectsVolume=\u062d\u062c\u0645 \u0627\u0644\u062a\u0623\u062b\u064a\u0631\u0627\u062a
|
effects-volume=\u0635\u0648\u062a \u0627\u0644\u062a\u0623\u062b\u064a\u0631\u0627\u062a
|
||||||
musicVolume=Music Volume (translate me)
|
enter-the-server-ip=\u0623\u062f\u062e\u0644 \u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u064a\u0631\u0641\u0631
|
||||||
|
enter-the-server-port=\u0623\u062f\u062e\u0644 \u0645\u0646\u0641\u0630 \u0627\u0644\u0633\u064a\u0631\u0641\u0631
|
||||||
|
enter-your-name=\u0623\u062f\u062e\u0644 \u0627\u0633\u0645\u0643
|
||||||
|
error=\u062e\u0637\u0623
|
||||||
|
exit=\u062e\u0631\u0648\u062c
|
||||||
|
forfeit=\u0627\u0633\u062a\u0643\u0644\u0627\u0644
|
||||||
fullscreen=\u0643\u0627\u0645\u0644 \u0627\u0644\u0634\u0627\u0634\u0629
|
fullscreen=\u0643\u0627\u0645\u0644 \u0627\u0644\u0634\u0627\u0634\u0629
|
||||||
goodGameText=\u0644\u0639\u0628\u0629 \u0631\u0627\u0626\u0639\u0629. \u0623\u062D\u0633\u0646\u062A.
|
game-over=\u0627\u0646\u062a\u0647\u062a \u0627\u0644\u0644\u0639\u0628\u0629
|
||||||
human=\u0627\u0644\u0625\u0646\u0633\u0627\u0646
|
general=\u0639\u0627\u0645
|
||||||
language=\u0627\u0644\u0644\u063a\u0629
|
high-contrast=\u062A\u0628\u0627\u0646\u064A\u0629 \u0639\u0627\u0644\u064A
|
||||||
large=\u0643\u0628\u064A\u0631
|
invalid-username=\u0627\u0633\u0645 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d
|
||||||
layoutSize=\u062D\u062C\u0645 \u0627\u0644\u062A\u0635\u0645\u064A\u0645
|
ip-address=\u0639\u0646\u0648\u0627\u0646 IP
|
||||||
light-hc=\u0641\u0627\u062A\u062D (\u062A\u0646\u0627\u0642\u0636 \u0639\u0627\u0644\u064D)
|
is-not-a-valid-ip-address=\u0644\u064a\u0633 \u0639\u0646\u0648\u0627\u0646 IP \u0635\u062d\u064a\u062d
|
||||||
light=\u0641\u0627\u062A\u062D
|
is-not-a-valid-port=\u0644\u064a\u0633 \u0645\u0646\u0641\u0630 \u0635\u062d\u064a\u062d
|
||||||
|
language=\u0644\u063a\u0629
|
||||||
|
large=\u0633\u064a\u0631
|
||||||
|
layout-size=\u062d\u062c\u0645 \u0627\u0644\u062a\u0635\u0645\u064a\u0645
|
||||||
|
light=\u0636\u0624\u0621
|
||||||
local=\u0645\u062d\u0644\u064a
|
local=\u0645\u062d\u0644\u064a
|
||||||
localization=\u062a\u0648\u0645\u064a\u0645 \u0627\u0644\u0644\u063a\u0629
|
localization=\u062a\u0639\u0631\u064a\u0628 \u0627\u0644\u0644\u063a\u0629
|
||||||
medium=\u0645\u062A\u0648\u0633\u0637
|
master-volume=\u0635\u0648\u062a \u0627\u0644\u0645\u0633\u062a\u0648\u0649
|
||||||
mergeCommander=\u0642\u0627\u0626\u062f \u0627\u0644\u062f\u0645\u062c
|
medium=\u0645\u062a\u0648\u0633\u0637
|
||||||
moralSupport=\u062f\u0639\u0645 \u0645\u0639\u0646\u0648\u064a
|
merge-commander=Merge Commander
|
||||||
|
moral-support=\u062f\u0639\u0645 \u0623\u0639\u0635\u0627\u0628\u064a
|
||||||
|
music-volume=\u0635\u0648\u062a \u0627\u0644\u0645\u0648\u0633\u064a\u0642\u0649
|
||||||
|
name=\u0627\u0633\u0645
|
||||||
no=\u0644\u0627
|
no=\u0644\u0627
|
||||||
|
ok=\u0645\u0648\u0627\u0641\u0642
|
||||||
|
online=\u0645\u062a\u0635\u0644
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=\u0627\u0644\u062e\u064a\u0627\u0631\u0627\u062a
|
options=\u062e\u064a\u0627\u0631\u0627\u062a
|
||||||
othello=\u0623\u0648\u062a\u064a\u0644\u0648
|
play=\u0644\u0639\u0628
|
||||||
playerName=\u0627\u0633\u0645 \u0627\u0644\u0644\u0627\u0639\u0628
|
player-name=\u0627\u0633\u0645 \u0627\u0644\u0644\u0627\u0639\u0628
|
||||||
productOwner=\u0645\u0627\u0644\u0643 \u0627\u0644\u0645\u0646\u062a\u062c
|
player=\u0644\u0627\u0639\u0628
|
||||||
|
please-enter-your-name=\u064a\u0631\u062c\u0649 \u0623\u062f\u062e\u0644 \u0627\u0633\u0645\u0643
|
||||||
|
port=\u0645\u0646\u0641\u0630
|
||||||
|
product-owner=\u0635\u0627\u062d\u0628 \u0627\u0644\u0645\u0646\u062a\u062c
|
||||||
quit=\u062e\u0631\u0648\u062c
|
quit=\u062e\u0631\u0648\u062c
|
||||||
quitSure=\u0647\u0644 \u0623\u0646\u062a \u0645\u062a\u0623\u0643\u062f\u061f
|
reversi=\u0631\u064a\u0641\u0631\u0633\u064a
|
||||||
scrumMaster=\u0645\u062f\u064a\u0631 \u0627\u0644\u0633\u0643\u0631\u0645
|
scrum-master=Scrum Master
|
||||||
server=\u062e\u0627\u062f\u0645
|
send=\u0625\u0631\u0633\u0627\u0644
|
||||||
serverIP=IP \u0627\u0644\u062e\u0627\u062f\u0645
|
server-information=\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0633\u064a\u0631\u0641\u0631
|
||||||
serverPort=\u0645\u0646\u0641\u0630 \u0627\u0644\u062e\u0627\u062f\u0645
|
small=\u0635\u063a\u064a\u0631
|
||||||
small=\u0635\u063A\u064A\u0631
|
style=\u0623\u0633\u0644\u0648\u0628
|
||||||
start=\u0627\u0628\u062f\u0623
|
the-game-ended-in-a-draw=\u0627\u0646\u062a\u0647\u062a \u0627\u0644\u0644\u0639\u0628\u0629 \u0628\u062a\u0639\u0627\u062f\u0644
|
||||||
theme=\u0627\u0644\u0645\u0648\u0636\u0648\u0639
|
theme=\u0645\u0648\u0636\u0648\u0639
|
||||||
tictactoe=\u062a\u064a\u0643 \u062a\u0627\u0643 \u062a\u0648
|
tic-tac-toe=\u062a\u064a\u0643 \u062a\u0627\u0643 \u062a\u0648
|
||||||
volume=\u0627\u0644\u062d\u062c\u0645 \u0627\u0644\u0631\u0626\u064a\u0633\u064a
|
to-a-game-of=\u0625\u0644\u0649 \u0644\u0639\u0628\u0629 \u0645\u0646
|
||||||
windowed=\u0646\u0627\u0641\u0630\u064a
|
volume=\u0635\u0648\u062a
|
||||||
|
windowed=\u0641\u064a \u0646\u0641\u0630\u0629
|
||||||
yes=\u0646\u0639\u0645
|
yes=\u0646\u0639\u0645
|
||||||
|
you-lost-against=\u0623\u0646\u062a \u062e\u0633\u0631\u062a \u0636\u062f
|
||||||
|
you-were-challenged-by=\u062a\u062d\u062f\u064a\u062a \u0645\u0646
|
||||||
|
you-win=\u0623\u0646\u062a \u062a\u0641\u0648\u0632
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629
|
||||||
chinese=\u4e2d\u6587 (\u0627\u0644\u0635\u064a\u0646\u064a\u0629)
|
chinese=\u4e2d\u6587 (\u0627\u0644\u0635\u064a\u0646\u064a\u0629)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
|
accept=Akzeptieren
|
||||||
ai=K\u00fcnstliche Intelligenz
|
ai=K\u00fcnstliche Intelligenz
|
||||||
appTitle=ISY Spieleauswahl
|
app-title=ISY Spiele-Auswahl
|
||||||
|
are-you-sure=Sind Sie sicher?
|
||||||
back=Zur\u00fcck
|
back=Zur\u00fcck
|
||||||
backToMainMenu=Zur\u00FCck zum Hauptmen\u00FC
|
cancel=Abbrechen
|
||||||
|
challenge=Herausforderung
|
||||||
|
computer-difficulty=Computer Schwierigkeit
|
||||||
|
computer-think-time=Computer Denkzeit
|
||||||
computer=Computer
|
computer=Computer
|
||||||
computerDifficulty=Computerschwierigkeit
|
|
||||||
computerThinkTime=Computer Denkzeit
|
|
||||||
congratulations=Gl\u00FCckwunsch
|
|
||||||
connect=Verbinden
|
connect=Verbinden
|
||||||
connectionType=Verbindungstyp
|
|
||||||
credits=Credits
|
credits=Credits
|
||||||
dark-hc=Dunkel (Hoher Kontrast)
|
|
||||||
dark=Dunkel
|
dark=Dunkel
|
||||||
|
deny=Ablehnen
|
||||||
developers=Entwickler
|
developers=Entwickler
|
||||||
drawText=Das Spiel endete unentschieden
|
disconnect=Trennen
|
||||||
effectsVolume=Effektlautst\u00e4rke
|
effects-volume=Effektlautst\u00e4rke
|
||||||
musicVolume=Music Volume (translate me)
|
enter-the-server-ip=Server-IP eingeben
|
||||||
|
enter-the-server-port=Server-Port eingeben
|
||||||
|
enter-your-name=Geben Sie Ihren Namen ein
|
||||||
|
error=Fehler
|
||||||
|
exit=Beenden
|
||||||
|
forfeit=Aufgeben
|
||||||
fullscreen=Vollbild
|
fullscreen=Vollbild
|
||||||
goodGameText=Gutes Spiel. Gut gespielt.
|
game-over=Spiel vorbei
|
||||||
human=Mensch
|
general=Allgemein
|
||||||
|
high-contrast=Hoher Kontrast
|
||||||
|
invalid-username=Ung\u00fcltiger Benutzername
|
||||||
|
ip-address=IP-Adresse
|
||||||
|
is-not-a-valid-ip-address=ist keine g\u00fcltige IP-Adresse
|
||||||
|
is-not-a-valid-port=ist kein g\u00fcltiger Port
|
||||||
language=Sprache
|
language=Sprache
|
||||||
large=Gro\u00DF
|
large=Gro\u00df
|
||||||
layoutSize=Layout-Gr\u00F6\u00DFe
|
layout-size=Layout-Gr\u00f6\u00dfe
|
||||||
light-hc=Hell (Hoher Kontrast)
|
|
||||||
light=Hell
|
light=Hell
|
||||||
local=Lokal
|
local=Lokal
|
||||||
localization=Lokalisierung
|
localization=Lokalisierung
|
||||||
|
master-volume=Gesamtlautst\u00e4rke
|
||||||
medium=Mittel
|
medium=Mittel
|
||||||
mergeCommander=Merge-Kommandant
|
merge-commander=Merge Commander
|
||||||
moralSupport=Mentale Unterst\u00fctzung
|
moral-support=Mentale Unterst\u00fctzung
|
||||||
|
music-volume=Musiklautst\u00e4rke
|
||||||
|
name=Name
|
||||||
no=Nein
|
no=Nein
|
||||||
|
ok=Ok
|
||||||
|
online=Online
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=Optionen
|
options=Optionen
|
||||||
othello=Othello
|
play=Spielen
|
||||||
playerName=Spielername
|
player-name=Spielername
|
||||||
productOwner=Produktverantwortlicher
|
player=Spieler
|
||||||
|
please-enter-your-name=Bitte geben Sie Ihren Namen ein
|
||||||
|
port=Port
|
||||||
|
product-owner=Produktverantwortlicher
|
||||||
quit=Beenden
|
quit=Beenden
|
||||||
quitSure=Bist du dir sicher?
|
reversi=Reversi
|
||||||
scrumMaster=Scrum Master
|
scrum-master=Scrum Master
|
||||||
server=Server
|
send=Senden
|
||||||
serverIP=Server-IP
|
server-information=Serverinformationen
|
||||||
serverPort=Server-Port
|
|
||||||
small=Klein
|
small=Klein
|
||||||
start=Start
|
style=Stil
|
||||||
|
the-game-ended-in-a-draw=Das Spiel endete unentschieden
|
||||||
theme=Thema
|
theme=Thema
|
||||||
tictactoe=Tic Tac Toe
|
tic-tac-toe=Tic Tac Toe
|
||||||
volume=Hauptlautst<EFBFBD>rke
|
to-a-game-of=zu einem Spiel von
|
||||||
|
volume=Lautst\u00e4rke
|
||||||
windowed=Fenstermodus
|
windowed=Fenstermodus
|
||||||
yes=Ja
|
yes=Ja
|
||||||
|
you-lost-against=Sie haben gegen ... verloren
|
||||||
|
you-were-challenged-by=Sie wurden herausgefordert von ...
|
||||||
|
you-win=Sie gewinnen
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabisch)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabisch)
|
||||||
chinese=\u4e2d\u6587 (Chinesisch)
|
chinese=\u4e2d\u6587 (Chinesisch)
|
||||||
|
|||||||
@@ -1,56 +1,74 @@
|
|||||||
accept=Accept
|
accept=Accept
|
||||||
ai=Artificial Intelligence
|
ai=Artificial Intelligence
|
||||||
appTitle=ISY Games Selector
|
app-title=ISY Games Selector
|
||||||
|
are-you-sure=Are you sure?
|
||||||
back=Back
|
back=Back
|
||||||
backToMainMenu=Back to main menu
|
cancel=Cancel
|
||||||
challengeText=You were challenged by
|
challenge=Challenge
|
||||||
|
computer-difficulty=Computer difficulty
|
||||||
|
computer-think-time=Computer think time
|
||||||
computer=Computer
|
computer=Computer
|
||||||
computerDifficulty=Computer Difficulty
|
|
||||||
computerThinkTime=Computer Think Time
|
|
||||||
congratulations=Congratulations
|
|
||||||
connect=Connect
|
connect=Connect
|
||||||
connectionType=Connection Type
|
|
||||||
credits=Credits
|
credits=Credits
|
||||||
dark=Dark
|
dark=Dark
|
||||||
dark-hc=Dark (High Contrast)
|
|
||||||
deny=Deny
|
deny=Deny
|
||||||
developers=Developers
|
developers=Developers
|
||||||
drawText=The game ended in a draw
|
disconnect=Disconnect
|
||||||
effectsVolume=Effects Volume
|
effects-volume=Effects Volume
|
||||||
musicVolume=Music Volume
|
enter-the-server-ip=Enter the server ip
|
||||||
|
enter-the-server-port=Enter the server port
|
||||||
|
enter-your-name=Enter your name
|
||||||
|
error=Error
|
||||||
|
exit=Exit
|
||||||
|
forfeit=Forfeit
|
||||||
fullscreen=Fullscreen
|
fullscreen=Fullscreen
|
||||||
gameIsText=To a game of
|
game-over=Game Over
|
||||||
goodGameText=Good game. Well played.
|
general=General
|
||||||
human=Human
|
high-contrast=High contrast
|
||||||
|
invalid-username=invalid username
|
||||||
|
ip-address=IP address
|
||||||
|
is-not-a-valid-ip-address=is not a valid-ip address
|
||||||
|
is-not-a-valid-port=is not a valid port
|
||||||
language=Language
|
language=Language
|
||||||
large=Large
|
large=Large
|
||||||
layoutSize=Layout Size
|
layout-size=Layout Size
|
||||||
light=Light
|
light=Light
|
||||||
light-hc=Light (High Contrast)
|
|
||||||
local=Local
|
local=Local
|
||||||
localization=Localization
|
localization=Localization
|
||||||
|
master-volume=Master Volume
|
||||||
medium=Medium
|
medium=Medium
|
||||||
mergeCommander=Merge Commander
|
merge-commander=Merge Commander
|
||||||
moralSupport=Moral Support
|
moral-support=Moral Support
|
||||||
|
music-volume=Music Volume
|
||||||
|
name=Name
|
||||||
no=No
|
no=No
|
||||||
|
ok=Ok
|
||||||
|
online=Online
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=Options
|
options=Options
|
||||||
othello=Othello
|
play=Play
|
||||||
playerName=Player Name
|
player-name=Player name
|
||||||
productOwner=Product Owner
|
player=Player
|
||||||
|
please-enter-your-name=Please enter your name
|
||||||
|
port=Port
|
||||||
|
product-owner=Product Owner
|
||||||
quit=Quit
|
quit=Quit
|
||||||
quitSure=Are you sure?
|
reversi=Reversi
|
||||||
scrumMaster=Scrum Master
|
scrum-master=Scrum Master
|
||||||
server=Server
|
send=Send
|
||||||
serverIP=Server IP
|
server-information=Server information
|
||||||
serverPort=Server Port
|
|
||||||
small=Small
|
small=Small
|
||||||
start=Start
|
style=Style
|
||||||
|
the-game-ended-in-a-draw=The game ended in a draw
|
||||||
theme=Theme
|
theme=Theme
|
||||||
tictactoe=Tic Tac Toe
|
tic-tac-toe=Tic Tac Toe
|
||||||
volume=Master Volume
|
to-a-game-of=to a game of
|
||||||
|
volume=Volume
|
||||||
windowed=Windowed
|
windowed=Windowed
|
||||||
yes=Yes
|
yes=Yes
|
||||||
|
you-lost-against=You lost against
|
||||||
|
you-were-challenged-by=You were challenged by
|
||||||
|
you-win=You win
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabic)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabic)
|
||||||
chinese=\u4e2d\u6587 (Chinese)
|
chinese=\u4e2d\u6587 (Chinese)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
|
accept=Aceptar
|
||||||
ai=Inteligencia Artificial
|
ai=Inteligencia Artificial
|
||||||
appTitle=Selector de Juegos ISY
|
app-title=Selector de Juegos ISY
|
||||||
|
are-you-sure=\u00bfEst\u00e1s seguro?
|
||||||
back=Atr\u00e1s
|
back=Atr\u00e1s
|
||||||
backToMainMenu=Volver al men\u00FA principal
|
cancel=Cancelar
|
||||||
|
challenge=Desaf\u00edo
|
||||||
|
computer-difficulty=Dificultad del ordenador
|
||||||
|
computer-think-time=Tiempo de pensamiento del ordenador
|
||||||
computer=Ordenador
|
computer=Ordenador
|
||||||
computerDifficulty=Dificultad del Ordenador
|
|
||||||
computerThinkTime=Tiempo de pensamiento de la computadora
|
|
||||||
congratulations=Felicitaciones
|
|
||||||
connect=Conectar
|
connect=Conectar
|
||||||
connectionType=Tipo de conexi\u00F3n
|
|
||||||
credits=Cr\u00e9ditos
|
credits=Cr\u00e9ditos
|
||||||
dark-hc=Oscuro (Alto Contraste)
|
|
||||||
dark=Oscuro
|
dark=Oscuro
|
||||||
|
deny=Denegar
|
||||||
developers=Desarrolladores
|
developers=Desarrolladores
|
||||||
drawText=El juego termin\u00F3 en empate
|
disconnect=Desconectar
|
||||||
effectsVolume=Volumen de efectos
|
effects-volume=Volumen de efectos
|
||||||
musicVolume=Music Volume (translate me)
|
enter-the-server-ip=Introduce la IP del servidor
|
||||||
|
enter-the-server-port=Introduce el puerto del servidor
|
||||||
|
enter-your-name=Introduce tu nombre
|
||||||
|
error=Error
|
||||||
|
exit=Salir
|
||||||
|
forfeit=Rendirse
|
||||||
fullscreen=Pantalla completa
|
fullscreen=Pantalla completa
|
||||||
goodGameText=Buen juego. Bien jugado.
|
game-over=Fin del juego
|
||||||
human=Humano
|
general=General
|
||||||
|
high-contrast=Alto contraste
|
||||||
|
invalid-username=nombre de usuario inv\u00e1lido
|
||||||
|
ip-address=Direcci\u00f3n IP
|
||||||
|
is-not-a-valid-ip-address=no es una direcci\u00f3n IP v\u00e1lida
|
||||||
|
is-not-a-valid-port=no es un puerto v\u00e1lido
|
||||||
language=Idioma
|
language=Idioma
|
||||||
large=Grande
|
large=Grande
|
||||||
layoutSize=Tama\u00F1o del dise\u00F1o
|
layout-size=Tama\u00f1o de dise\u00f1o
|
||||||
light-hc=Claro (Alto Contraste)
|
|
||||||
light=Claro
|
light=Claro
|
||||||
local=Local
|
local=Local
|
||||||
localization=Localizaci\u00f3n
|
localization=Localizaci\u00f3n
|
||||||
|
master-volume=Volumen maestro
|
||||||
medium=Mediano
|
medium=Mediano
|
||||||
mergeCommander=Comandante de Merge
|
merge-commander=Merge Commander
|
||||||
moralSupport=Apoyo moral
|
moral-support=Apoyo moral
|
||||||
|
music-volume=Volumen de m\u00fasica
|
||||||
|
name=Nombre
|
||||||
no=No
|
no=No
|
||||||
|
ok=OK
|
||||||
|
online=En l\u00ednea
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=Opciones
|
options=Opciones
|
||||||
othello=Othello
|
play=Jugar
|
||||||
playerName=Nombre del Jugador
|
player-name=Nombre del jugador
|
||||||
productOwner=Propietario del Producto
|
player=Jugador
|
||||||
|
please-enter-your-name=Por favor, introduce tu nombre
|
||||||
|
port=Puerto
|
||||||
|
product-owner=Propietario del producto
|
||||||
quit=Salir
|
quit=Salir
|
||||||
quitSure=\u00BFAst\u00e1s seguro?
|
reversi=Reversi
|
||||||
scrumMaster=Scrum Master
|
scrum-master=Scrum Master
|
||||||
server=Servidor
|
send=Enviar
|
||||||
serverIP=Servidor-IP
|
server-information=Informaci\u00f3n del servidor
|
||||||
serverPort=Servidor-puerto
|
small=Peque\u00f1o
|
||||||
small=Peque\u00F1o
|
style=Estilo
|
||||||
start=Iniciar
|
the-game-ended-in-a-draw=El juego termin\u00f3 en empate
|
||||||
theme=Tema
|
theme=Tema
|
||||||
tictactoe=Tres en Raya
|
tic-tac-toe=Tres en raya
|
||||||
volume=Volumen principal
|
to-a-game-of=a un juego de
|
||||||
windowed=Ventana
|
volume=Volumen
|
||||||
|
windowed=En ventana
|
||||||
yes=S\u00ed
|
yes=S\u00ed
|
||||||
|
you-lost-against=Perdiste contra
|
||||||
|
you-were-challenged-by=Fuiste desafiado por
|
||||||
|
you-win=Ganaste
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Ar\u00e1bigo)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Ar\u00e1bigo)
|
||||||
chinese=\u4e2d\u6587 (Chino)
|
chinese=\u4e2d\u6587 (Chino)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
|
accept=Accepter
|
||||||
ai=Intelligence Artificielle
|
ai=Intelligence Artificielle
|
||||||
appTitle=S\u00e9lecteur de Jeux ISY
|
app-title=S\u00c9LECTEUR DE JEUX ISY
|
||||||
|
are-you-sure=\u00cates-vous s\u00fbr ?
|
||||||
back=Retour
|
back=Retour
|
||||||
backToMainMenu=Retour au menu principal
|
cancel=Annuler
|
||||||
|
challenge=D\u00e9fi
|
||||||
|
computer-difficulty=Difficult\u00e9 de l'ordinateur
|
||||||
|
computer-think-time=Temps de r\u00e9flexion de l'ordinateur
|
||||||
computer=Ordinateur
|
computer=Ordinateur
|
||||||
computerDifficulty=Difficult\u00e9 de l'Ordinateur
|
connect=Connexion
|
||||||
computerThinkTime=Temps de r\u00e9flexion de l'ordinateur
|
|
||||||
congratulations=F\u00E9licitations
|
|
||||||
connect=Connecter
|
|
||||||
connectionType=Type de connexion
|
|
||||||
credits=Cr\u00e9dits
|
credits=Cr\u00e9dits
|
||||||
dark-hc=Sombre (Contraste \u00E9lev\u00E9)
|
|
||||||
dark=Sombre
|
dark=Sombre
|
||||||
|
deny=Refuser
|
||||||
developers=D\u00e9veloppeurs
|
developers=D\u00e9veloppeurs
|
||||||
drawText=La partie s'est termin\u00E9e par un match nul
|
disconnect=D\u00e9connexion
|
||||||
effectsVolume=Volume des effets
|
effects-volume=Volume des effets
|
||||||
musicVolume=Music Volume (translate me)
|
enter-the-server-ip=Entrez l'adresse IP du serveur
|
||||||
|
enter-the-server-port=Entrez le port du serveur
|
||||||
|
enter-your-name=Entrez votre nom
|
||||||
|
error=Erreur
|
||||||
|
exit=Quitter
|
||||||
|
forfeit=Abandonner
|
||||||
fullscreen=Plein \u00e9cran
|
fullscreen=Plein \u00e9cran
|
||||||
goodGameText=Bien jou\u00E9. Bonne partie.
|
game-over=Fin de la partie
|
||||||
human=Humain
|
general=G\u00e9n\u00e9ral
|
||||||
|
high-contrast=Haut contraste
|
||||||
|
invalid-username=nom d'utilisateur invalide
|
||||||
|
ip-address=Adresse IP
|
||||||
|
is-not-a-valid-ip-address=n'est pas une adresse IP valide
|
||||||
|
is-not-a-valid-port=n'est pas un port valide
|
||||||
language=Langue
|
language=Langue
|
||||||
large=Grand
|
large=Grand
|
||||||
layoutSize=Taille de la disposition
|
layout-size=Format de l'affichage
|
||||||
light-hc=Clair (Contraste \u00E9lev\u00E9)
|
|
||||||
light=Clair
|
light=Clair
|
||||||
local=Local
|
local=Local
|
||||||
localization=Localisation
|
localization=Traduction
|
||||||
|
master-volume=Volume principal
|
||||||
medium=Moyen
|
medium=Moyen
|
||||||
mergeCommander=Commandant de Merge
|
merge-commander=Merge Commander
|
||||||
moralSupport=Soutien moral
|
moral-support=Soutien moral
|
||||||
|
music-volume=Volume de la musique
|
||||||
|
name=Nom
|
||||||
no=Non
|
no=Non
|
||||||
|
ok=OK
|
||||||
|
online=En ligne
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=Options
|
options=Options
|
||||||
othello=Othello
|
play=Jouer
|
||||||
playerName=Nom du joueur
|
player-name=Nom du joueur
|
||||||
productOwner=Responsable du produit
|
player=Joueur
|
||||||
|
please-enter-your-name=Veuillez entrer votre nom
|
||||||
|
port=Port
|
||||||
|
product-owner=Responsable produit
|
||||||
quit=Quitter
|
quit=Quitter
|
||||||
quitSure=Es-tu s\u00fbr ?
|
reversi=Reversi
|
||||||
scrumMaster=Scrum Master
|
scrum-master=Scrum Master
|
||||||
server=Serveur
|
send=Envoyer
|
||||||
serverIP=Serveur-IP
|
server-information=Informations du serveur
|
||||||
serverPort=Serveur-Port
|
|
||||||
small=Petit
|
small=Petit
|
||||||
start=D\u00e9marrer
|
style=Style
|
||||||
theme=Th\u00E8me
|
the-game-ended-in-a-draw=La partie s'est termin\u00e9e par un match nul
|
||||||
tictactoe=Morpion
|
theme=Th\u00e8me
|
||||||
volume=Volume principal
|
tic-tac-toe=Morpion
|
||||||
windowed=Fen\u00eatre
|
to-a-game-of=\u00e0 une partie de
|
||||||
|
volume=Volume
|
||||||
|
windowed=Fen\u00eatrr\u00e9
|
||||||
yes=Oui
|
yes=Oui
|
||||||
|
you-lost-against=Vous avez perdu contre
|
||||||
|
you-were-challenged-by=Vous avez \u00e9t\u00e9 d\u00e9fi\u00e9 par
|
||||||
|
you-win=Vous avez gagn\u00e9
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabe)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabe)
|
||||||
chinese=\u4e2d\u6587 (Chinois)
|
chinese=\u4e2d\u6587 (Chinois)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
ai=\u092a\u094d\u0930\u0924\u093f\u092a\u094d\u0930\u0923\u093e\u0924\u094d\u092e\u093e\u0928 \u092a\u094d\u0930\u092c\u094d\u0939\u093e\u0935\u0924\u094d\u0924\u093e
|
accept=\u0938\u094d\u0935\u0940\u0915\u093e\u0930
|
||||||
appTitle=ISY \u0917\u0947\u092e \u0938\u0947\u0932\u0947\u0915\u094d\u091f\u0930
|
ai=\u0915\u0943\u0924\u094d\u0930\u093f\u092e \u092c\u0941\u0926\u094d\u0927\u093f
|
||||||
back=\u092a\u093f\u091a\u093e\u0932
|
app-title=ISY \u0917\u0947\u092e \u091a\u092f\u0928\u0915\u093e\u0930\u0940
|
||||||
backToMainMenu=\u092E\u0947\u0928 \u092E\u0947\u0928\u0942 \u092A\u0930 \u0935\u093E\u092A\u0938 \u091C\u093E\u090F\u0902
|
are-you-sure=\u0915\u094d\u092f\u093e \u0906\u092a \u0928\u093f\u0936\u094d\u091a\u093f\u0924 \u0939\u0948\u0902?
|
||||||
computer=\u0915\u092e\u092a\u094d\u092f\u0942\u091f\u0930
|
back=\u092a\u0940\u091b\u0947
|
||||||
computerDifficulty=\u0915\u092e\u092a\u094d\u092f\u0942\u091f\u0930 \u092a\u094d\u0930\u092f\u093e\u0938
|
cancel=\u0930\u0926\u094d\u0926 \u0915\u0930\u0947\u0902
|
||||||
computerThinkTime=\u0915\u0902\u092a\u094d\u092f\u0942\u091f\u0930 \u0915\u0940 \u092a\u0930 \u092b\u0930 \u0938\u092e\u092f
|
challenge=\u091a\u0941\u0928\u094c\u0924\u0940
|
||||||
congratulations=\u092C\u0927\u093E\u0908
|
computer-difficulty=\u0915\u0902\u092a\u094d\u092f\u0942\u091f\u0930 \u0915\u0940 \u0915\u0920\u0928\u093e\u0908
|
||||||
connect=\u091c\u0942\u0921\u094d\u0921 \u0915\u0930\u0947\u0902
|
computer-think-time=\u0915\u0902\u092a\u094d\u092f\u0942\u091f\u0930 \u091a\u093f\u0902\u0924\u0928 \u0938\u092e\u092f
|
||||||
connectionType=\u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0915\u093E \u092A\u094D\u0930\u0915\u093E\u0930
|
computer=\u0915\u0902\u092a\u094d\u092f\u0942\u091f\u0930
|
||||||
credits=\u0916\u094d\u092f\u093e\u0924\u0947
|
connect=\u091c\u094b\u095c\u0947\u0902
|
||||||
dark-hc=\u0915\u093E\u0932\u093E (\u090A\u091A\u094D\u091A \u0915\u0949\u0928\u094D\u091F\u094D\u0930\u093E\u0938\u094D\u091F)
|
credits=\u0915\u094d\u0930\u0947\u0921\u093f\u091f\u094d\u0938
|
||||||
dark=\u0915\u093E\u0932\u093E
|
dark=\u0917\u0939\u0930\u093e
|
||||||
developers=\u0935\u093f\u0915\u0938\u093f\u0915\u0930
|
deny=\u0907\u0902\u0915\u093e\u0930
|
||||||
drawText=\u0916\u0947\u0932 \u091F\u0940\u091A \u092A\u0930 \u0916\u0924\u094D\u092E \u0939\u094B \u0917\u092F\u0940
|
developers=\u0935\u093f\u0915\u093e\u0938\u093f\u0924\u093e
|
||||||
effectsVolume=\u092a\u0631\u094d\u092a\u093e\u0935 \u0935\u094b\u0932\u094d\u092e
|
disconnect=\u091c\u094b\u095c \u091f\u0942\u091f\u0928\u093e
|
||||||
musicVolume=Music Volume (translate me)
|
effects-volume=\u090f\u092b\u0947\u0915\u094d\u091f \u0935\u0949\u0932\u094d\u092f\u0942\u092e
|
||||||
fullscreen=\u092a\u0942\u0930\u094d\u0923 \u0938\u0915\u0940\u0928\u093e
|
enter-the-server-ip=\u0938\u0930\u094d\u0935\u0930 IP \u0926\u093e\u0916\u093f\u090f
|
||||||
goodGameText=\u0905\u091A\u094D\u091B\u0940 \u0916\u0947\u0932 \u0925\u0940\u0964 \u091B\u0940 \u0916\u0942\u092C \u0916\u0947\u0932\u093E.
|
enter-the-server-port=\u0938\u0930\u094d\u0935\u0930 \u092a\u094b\u0930\u094d\u091f \u0926\u093e\u0916\u093f\u090f
|
||||||
human=\u092e\u093e\u0928\u0935
|
enter-your-name=\u0905\u092a\u0928\u093e \u0928\u093e\u092e \u0926\u093e\u0916\u093f\u090f
|
||||||
|
error=\u0924\u094d\u0930\u0941\u091f\u093f
|
||||||
|
exit=\u092c\u093e\u0939\u0930 \u0928\u093f\u0915\u093e\u0932\u0940\u090f\u0902
|
||||||
|
forfeit=\u0939\u093e\u0930 \u092e\u093e\u0928\u0928\u093e
|
||||||
|
fullscreen=\u092a\u0942\u0930\u0940 \u0938\u094d\u0915\u094d\u0930\u0940\u0928
|
||||||
|
game-over=\u0916\u0947\u0932 \u0916\u0924\u094d\u092e
|
||||||
|
general=\u0938\u093e\u092e\u093e\u0928\u094d\u092f
|
||||||
|
high-contrast=\u0909\u091A\u094D\u091A\u093F\u0924 \u0915\u0949\u0902\u091F\u094D\u0930\u093E\u0938\u094D\u091F
|
||||||
|
invalid-username=\u0905\u092e\u093e\u0928\u094d\u092f \u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e \u0928\u093e\u092e
|
||||||
|
ip-address=IP \u092a\u0924\u093e
|
||||||
|
is-not-a-valid-ip-address=\u092f\u0939 \u090f\u0915 \u0905\u092e\u093e\u0928\u094d\u092f IP \u092a\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948
|
||||||
|
is-not-a-valid-port=\u092f\u0939 \u090f\u0915 \u0905\u092e\u093e\u0928\u094d\u092f \u092a\u094b\u0930\u094d\u091f \u0928\u0939\u0940\u0902 \u0939\u0948
|
||||||
language=\u092d\u093e\u0937\u093e
|
language=\u092d\u093e\u0937\u093e
|
||||||
large=\u092C\u0921\u093C\u093E
|
large=\u092c\u095c\u093e
|
||||||
layoutSize=\u0930\u0942\u092A\u0930\u0947\u0916 \u0915\u093E \u0906\u0915\u093E\u0930
|
layout-size=\u0932\u0947\u090f\u0913\u091f \u0915\u093e \u0906\u0915\u093e\u0930
|
||||||
light-hc=\u091A\u094D\u092E\u092C\u0940\u0932\u093E (\u090A\u091A\u094D\u091A \u0915\u0949\u0928\u094D\u091F\u094D\u0930\u093E\u0938\u094D\u091F)
|
light=\u0915\u0947\u091c\u093c\u093e
|
||||||
light=\u091A\u094D\u092E\u092C\u0940\u0932\u093E
|
local=\u0938\u094d\u0925\u093e\u0928\u0940\u092f
|
||||||
local=\u0938\u094d\u0925\u093e\u0928\u093f\u092f
|
localization=\u0938\u094d\u0925\u093e\u0928\u0940\u092f\u0915\u0930\u0923
|
||||||
localization=\u0938\u094d\u0925\u093e\u0928\u093f\u092f\u0915\u0930\u0923
|
master-volume=\u092e\u093e\u0938\u094d\u091f\u0930 \u0935\u0949\u0932\u094d\u092f\u0942\u092e
|
||||||
medium=\u092E\u0927\u094D\u092F\u092E
|
medium=\u092e\u0927\u094d\u092f\u092e
|
||||||
mergeCommander=\u092e\u0930\u094d\u091c \u0915\u092e\u0902\u0921\u0930
|
merge-commander=\u092e\u0930\u094d\u091c \u0915\u092e\u093e\u0902\u0921\u0930
|
||||||
moralSupport=\u0928\u094d\u092e\u093e\u0928\u093f\u0915 \u0938\u092e\u0930\u094d\u0925\u0928
|
moral-support=\u0928\u0948\u0924\u093f\u0915 \u0938\u0939\u093e\u0930\u093e
|
||||||
|
music-volume=\u0938\u0902\u0917\u0940\u0924 \u0935\u0949\u0932\u094d\u092f\u0942\u092e
|
||||||
|
name=\u0928\u093e\u092e
|
||||||
no=\u0928\u0939\u0940\u0902
|
no=\u0928\u0939\u0940\u0902
|
||||||
|
ok=\u0920\u0940\u0915 \u0939\u0948
|
||||||
|
online=\u0911\u0928\u0932\u093e\u0907\u0928
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=\u0935\u093f\u0915\u0932\u094d\u092a
|
options=\u0935\u093f\u0915\u0932\u094d\u092a
|
||||||
othello=\u0913\u0925\u0940\u0932\u094b
|
play=\u0916\u0947\u0932\u0947\u0902
|
||||||
playerName=\u0915\u0941\u0930\u093e\u0930\u0940 \u0928\u093e\u092e
|
player-name=\u0916\u093f\u0932\u093e\u095e\u0940 \u0915\u093e \u0928\u093e\u092e
|
||||||
productOwner=\u0906\u092f\u0947\u0915\u093e \u092e\u093e\u0932\u093f\u0915
|
player=\u0916\u093f\u0932\u093e\u095e\u0940
|
||||||
quit=\u0938\u094e\u091c\u094d
|
please-enter-your-name=\u0915\u0943\u092a\u092f\u093e \u0905\u092a\u0928\u093e \u0928\u093e\u092e \u0926\u093e\u0916\u093f\u090f
|
||||||
quitSure=\u0915\u094d\u092f\u093e \u0915\u094d\u092f\u093e \u091f\u0940\u091f \u0939\u0948\u0902?
|
port=\u092a\u094b\u0930\u094d\u091f
|
||||||
scrumMaster=\u0938\u094d\u0915\u094d\u0930\u0941\u092e \u092e\u093e\u0938\u094d\u091f\u0930
|
product-owner=\u092a\u094d\u0930\u094b\u0921\u0915\u094d\u091f \u0915\u093e \u092e\u093e\u0932\u093f\u0915
|
||||||
server=\u0938\u0930\u094d\u0935\u0930
|
quit=\u091b\u094b\u0921\u0947\u0902
|
||||||
serverIP=\u0938\u0930\u094d\u0935\u0930 IP
|
reversi=\u0930\u093f\u0935\u0930\u094d\u0938\u0940
|
||||||
serverPort=\u0938\u0930\u094d\u0935\u0930 \u092a\u094b\u0930\u094d\u091f
|
scrum-master=\u0938\u094d\u0915\u094d\u0930\u092e \u092e\u093e\u0938\u094d\u091f\u0930
|
||||||
small=\u091B\u094B\u091F\u093E
|
send=\u092d\u0947\u091c\u0947\u0902
|
||||||
start=\u092b\u093f\u0930\u0942
|
server-information=\u0938\u0930\u094d\u0935\u0930 \u091c\u093e\u0928\u0915\u093e\u0930\u0940
|
||||||
theme=\u0925\u0940\u092E
|
small=\u091b\u094b\u091f\u093e
|
||||||
tictactoe=\u091f\u093f\u0915 \u091f\u0948\u0915 \u091f\u094b
|
style=\u0936\u0948\u0932\u0940
|
||||||
volume=\u092e\u0941\u0916\u094d\u092f \u0906\u0935\u093e\u091c
|
the-game-ended-in-a-draw=\u0916\u0947\u0932 \u091f\u0940\u0915 \u0939\u094b \u0917\u092f\u093e
|
||||||
windowed=\u0915\u094d\u0930\u094d\u0939 \u092e\u0947\u0902
|
theme=\u0925\u0940\u092e
|
||||||
yes=\u0939\u093e\u0907
|
tic-tac-toe=\u091f\u093f\u0915-\u091f\u0948\u0915-\u091f\u094b
|
||||||
|
to-a-game-of=\u0916\u0947\u0932 \u0915\u0940 \u090f\u0915 \u0916\u0947\u0932 \u0915\u0940 \u0913\u0930
|
||||||
|
volume=\u0935\u0949\u0932\u094d\u092f\u0942\u092e
|
||||||
|
windowed=\u0935\u093f\u0902\u0921\u094b \u092e\u094b\u0921
|
||||||
|
yes=\u0939\u093e\u0901
|
||||||
|
you-lost-against=\u0906\u092a \u0939\u093e\u0930 \u0917\u090f
|
||||||
|
you-were-challenged-by=\u0906\u092a\u0915\u094b \u091a\u0941\u0928\u094c\u0924\u0940 \u0926\u0940 \u0917\u0908
|
||||||
|
you-win=\u0906\u092a \u091c\u0940\u0924 \u0917\u090f
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0905\u0930\u092c\u0940)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0905\u0930\u092c\u0940)
|
||||||
chinese=\u4e2d\u6587 (\u091a\u0940\u0928\u0940)
|
chinese=\u4e2d\u6587 (\u091a\u0940\u0928\u0940)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
|
accept=Accetta
|
||||||
ai=Intelligenza Artificiale
|
ai=Intelligenza Artificiale
|
||||||
appTitle=Selettore di Giochi ISY
|
app-title=Selettore di Giochi ISY
|
||||||
|
are-you-sure=Sei sicuro?
|
||||||
back=Indietro
|
back=Indietro
|
||||||
backToMainMenu=Ritorna al menu principale
|
cancel=Annulla
|
||||||
|
challenge=Sfida
|
||||||
|
computer-difficulty=Difficolt\u00e0 del computer
|
||||||
|
computer-think-time=Tempo di riflessione del computer
|
||||||
computer=Computer
|
computer=Computer
|
||||||
computerDifficulty=Difficolt\u00e0 del computer
|
|
||||||
computerThinkTime=Tempo di pensiero del computer
|
|
||||||
congratulations=Congratulazioni
|
|
||||||
connect=Connetti
|
connect=Connetti
|
||||||
connectionType=Tipo di connessione
|
|
||||||
credits=Crediti
|
credits=Crediti
|
||||||
dark-hc=Scuro (Alto Contrasto)
|
|
||||||
dark=Scuro
|
dark=Scuro
|
||||||
|
deny=Nega
|
||||||
developers=Sviluppatori
|
developers=Sviluppatori
|
||||||
drawText=La partita \u00E8 terminata in parit\u00E0
|
disconnect=Disconnetti
|
||||||
effectsVolume=Volume effetti
|
effects-volume=Volume degli effetti
|
||||||
musicVolume=Music Volume (translate me)
|
enter-the-server-ip=Inserisci l'IP del server
|
||||||
|
enter-the-server-port=Inserisci la porta del server
|
||||||
|
enter-your-name=Inserisci il tuo nome
|
||||||
|
error=Errore
|
||||||
|
exit=Esci
|
||||||
|
forfeit=Abbandona
|
||||||
fullscreen=Schermo intero
|
fullscreen=Schermo intero
|
||||||
goodGameText=Bel gioco. Ben giocato.
|
game-over=Fine del gioco
|
||||||
human=Umano
|
general=Generale
|
||||||
|
high-contrast=Alto contrasto
|
||||||
|
invalid-username=nome utente non valido
|
||||||
|
ip-address=Indirizzo IP
|
||||||
|
is-not-a-valid-ip-address=non \u00e8 un indirizzo IP valido
|
||||||
|
is-not-a-valid-port=non \u00e8 una porta valida
|
||||||
language=Lingua
|
language=Lingua
|
||||||
large=Grande
|
large=Grande
|
||||||
layoutSize=Dimensione Layout
|
layout-size=Dimensione layout
|
||||||
light-hc=Chiaro (Alto Contrasto)
|
|
||||||
light=Chiaro
|
light=Chiaro
|
||||||
local=Locale
|
local=Locale
|
||||||
localization=Localizzazione
|
localization=Localizzazione
|
||||||
|
master-volume=Volume principale
|
||||||
medium=Medio
|
medium=Medio
|
||||||
mergeCommander=Comandante di Merge
|
merge-commander=Merge Commander
|
||||||
moralSupport=Supporto morale
|
moral-support=Supporto morale
|
||||||
|
music-volume=Volume della musica
|
||||||
|
name=Nome
|
||||||
no=No
|
no=No
|
||||||
|
ok=OK
|
||||||
|
online=Online
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=Opzioni
|
options=Opzioni
|
||||||
othello=Othello
|
play=Gioca
|
||||||
playerName=Nome del giocatore
|
player-name=Nome del giocatore
|
||||||
productOwner=Proprietario del prodotto
|
player=Giocatore
|
||||||
quit=Uscire
|
please-enter-your-name=Per favore inserisci il tuo nome
|
||||||
quitSure=Sei sicuro?
|
port=Porta
|
||||||
scrumMaster=Scrum Master
|
product-owner=Proprietario del prodotto
|
||||||
server=Server
|
quit=Esci
|
||||||
serverIP=Server-IP
|
reversi=Reversi
|
||||||
serverPort=Porta del server
|
scrum-master=Scrum Master
|
||||||
|
send=Invia
|
||||||
|
server-information=Informazioni sul server
|
||||||
small=Piccolo
|
small=Piccolo
|
||||||
start=Inizia
|
style=Stile
|
||||||
|
the-game-ended-in-a-draw=La partita \u00e8 terminata in parit\u00e0
|
||||||
theme=Tema
|
theme=Tema
|
||||||
tictactoe=Tic Tac Toe
|
tic-tac-toe=Tris
|
||||||
volume=Volume principale
|
to-a-game-of=a una partita di
|
||||||
|
volume=Volume
|
||||||
windowed=Finestra
|
windowed=Finestra
|
||||||
yes=S\u00ec
|
yes=S\u00ec
|
||||||
|
you-lost-against=Hai perso contro
|
||||||
|
you-were-challenged-by=Sei stato sfidato da
|
||||||
|
you-win=Hai vinto
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabo)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabo)
|
||||||
chinese=\u4e2d\u6587 (Cinese)
|
chinese=\u4e2d\u6587 (Cinese)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
ai=\u4eba\u5de5\u77e5\u80fd
|
accept=\u627f\u8a8d
|
||||||
appTitle=ISY \u30b2\u30fc\u30e0\u30bb\u30ec\u30af\u30bf\u30fc
|
ai=\u4eba\u5de5\u77e9\u7565
|
||||||
|
app-title=ISY\u30b2\u30fc\u30e0\u30bb\u30ec\u30af\u30bf\u30fc
|
||||||
|
are-you-sure=\u672c\u5f53\u306b\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f
|
||||||
back=\u623b\u308b
|
back=\u623b\u308b
|
||||||
backToMainMenu=\u30E1\u30A4\u30F3\u30E1\u30CB\u30E5\u30FC\u306B\u623B\u308B
|
cancel=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||||
computer=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc
|
challenge=\u6311\u6226
|
||||||
computerDifficulty=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u96e3\u6613\u5ea6
|
computer-difficulty=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306e\u96e3\u6613\u5ea6
|
||||||
computerThinkTime=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306e\u8003\u3048\u6642\u9593
|
computer-think-time=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306e\u601d\u8003\u6642\u9593
|
||||||
congratulations=\u304A\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307E\u3059
|
computer=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf
|
||||||
connect=\u63a5\u7d9a
|
connect=\u63a5\u7d9a
|
||||||
connectionType=\u63A5\u7D9A\u30BF\u30A4\u30D7
|
|
||||||
credits=\u30af\u30ec\u30b8\u30c3\u30c8
|
credits=\u30af\u30ec\u30b8\u30c3\u30c8
|
||||||
dark-hc=\u30C0\u30FC\u30AF (\u9AD8\u30B3\u30F3\u30C8\u30E9\u30B9\u30C8)
|
dark=\u30c0\u30fc\u30af
|
||||||
dark=\u30C0\u30FC\u30AF
|
deny=\u62d2\u5426
|
||||||
developers=\u958b\u767a\u8005
|
developers=\u958b\u767a\u8005
|
||||||
drawText=\u30B2\u30FC\u30E0\u306F\u5E73\u7B49\u306B\u7D42\u4E86\u3057\u307E\u3057\u305F
|
disconnect=\u5207\u65ad
|
||||||
effectsVolume=\u30a8\u30d5\u30a7\u30af\u30c8\u30dc\u30ea\u30e5\u30fc\u30e0
|
effects-volume=\u52b9\u679c\u97f3\u91cf
|
||||||
musicVolume=Music Volume (translate me)
|
enter-the-server-ip=\u30b5\u30fc\u30d0\u30fcIP\u3092\u5165\u529b
|
||||||
fullscreen=\u5168\u753b\u9762
|
enter-the-server-port=\u30b5\u30fc\u30d0\u30fc\u30dd\u30fc\u30c8\u3092\u5165\u529b
|
||||||
goodGameText=\u3044\u3044\u30B2\u30FC\u30E0\u3067\u3057\u305F\u3002\u3088\u304F\u6226\u3044\u307E\u3057\u305F\u3002
|
enter-your-name=\u540d\u524d\u3092\u5165\u529b
|
||||||
human=\u4eba\u9593
|
error=\u30a8\u30e9\u30fc
|
||||||
|
exit=\u7d42\u4e86
|
||||||
|
forfeit=\u8f9e\u9000
|
||||||
|
fullscreen=\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3
|
||||||
|
game-over=\u30b2\u30fc\u30e0\u30aa\u30fc\u30d0\u30fc
|
||||||
|
general=\u4e00\u822c
|
||||||
|
high-contrast=\u9AD8\u30B3\u30F3\u30C8\u30E9\u30B9
|
||||||
|
invalid-username=\u7121\u52b9\u306a\u30e6\u30fc\u30b6\u30fc\u540d
|
||||||
|
ip-address=IP\u30a2\u30c9\u30ec\u30b9
|
||||||
|
is-not-a-valid-ip-address=\u6709\u52b9\u306aIP\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093
|
||||||
|
is-not-a-valid-port=\u6709\u52b9\u306a\u30dd\u30fc\u30c8\u756a\u53f7\u3067\u306f\u3042\u308a\u307e\u305b\u3093
|
||||||
language=\u8a00\u8a9e
|
language=\u8a00\u8a9e
|
||||||
large=\u5927
|
large=\u5927
|
||||||
layoutSize=\u30EC\u30A4\u30A2\u30A6\u30C8\u30B5\u30A4\u30BA
|
layout-size=\u30ec\u30a4\u30a2\u30a6\u30c8\u30b5\u30a4\u30ba
|
||||||
light-hc=\u30E9\u30A4\u30C8 (\u9AD8\u30B3\u30F3\u30C8\u30E9\u30B9\u30C8)
|
light=\u30e9\u30a4\u30c8
|
||||||
light=\u30E9\u30A4\u30C8
|
local=\u30ed\u30fc\u30ab\u30eb
|
||||||
local=\u5730\u57df
|
|
||||||
localization=\u30ed\u30fc\u30ab\u30e9\u30a4\u30bc\u30fc\u30b7\u30e7\u30f3
|
localization=\u30ed\u30fc\u30ab\u30e9\u30a4\u30bc\u30fc\u30b7\u30e7\u30f3
|
||||||
medium=\u4E2D
|
master-volume=\u30de\u30b9\u30bf\u30fc\u30dc\u30ea\u30e5\u30fc\u30e0
|
||||||
mergeCommander=\u30de\u30fc\u30b8\u30b3\u30de\u30f3\u30c0\u30fc
|
medium=\u4e2d
|
||||||
moralSupport=\u6c17\u529b\u652f\u63f4
|
merge-commander=\u30de\u30fc\u30b8\u30b3\u30de\u30f3\u30c0\u30fc
|
||||||
|
moral-support=\u30e1\u30f3\u30bf\u30eb\u30b5\u30dd\u30fc\u30c8
|
||||||
|
music-volume=\u97f3\u697d\u97f3\u91cf
|
||||||
|
name=\u540d\u524d
|
||||||
no=\u3044\u3044\u3048
|
no=\u3044\u3044\u3048
|
||||||
|
ok=OK
|
||||||
|
online=\u30aa\u30f3\u30e9\u30a4\u30f3
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=\u30aa\u30d7\u30b7\u30e7\u30f3
|
options=\u30aa\u30d7\u30b7\u30e7\u30f3
|
||||||
othello=\u30aa\u30bb\u30ed
|
play=\u30d7\u30ec\u30a4
|
||||||
playerName=\u30d7\u30ec\u30a4\u30e4\u30fc\u540d
|
player-name=\u30d7\u30ec\u30a4\u30e4\u30fc\u540d
|
||||||
productOwner=\u30d7\u30ed\u30c0\u30af\u30c8\u30aa\u30fc\u30ca\u30fc
|
player=\u30d7\u30ec\u30a4\u30e4\u30fc
|
||||||
|
please-enter-your-name=\u540d\u524d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044
|
||||||
|
port=\u30dd\u30fc\u30c8
|
||||||
|
product-owner=\u30d7\u30ed\u30c0\u30af\u30c8\u30aa\u30fc\u30ca\u30fc
|
||||||
quit=\u7d42\u4e86
|
quit=\u7d42\u4e86
|
||||||
quitSure=\u672c\u5f53\u306b\u7d42\u4e86\u3057\u307e\u3059\u304b\uff1f
|
reversi=\u30ea\u30d0\u30fc\u30b7
|
||||||
scrumMaster=\u30b9\u30af\u30e9\u30e0\u30de\u30b9\u30bf\u30fc
|
scrum-master=\u30b9\u30af\u30e9\u30e0\u30de\u30b9\u30bf\u30fc
|
||||||
server=\u30b5\u30fc\u30d0\u30fc
|
send=\u9001\u4fe1
|
||||||
serverIP=\u30b5\u30fc\u30d0\u30fc IP
|
server-information=\u30b5\u30fc\u30d0\u60c5\u5831
|
||||||
serverPort=\u30b5\u30fc\u30d0\u30fc \u30dd\u30fc\u30c8
|
small=\u5c0f
|
||||||
small=\u5C0F
|
style=\u30b9\u30bf\u30a4\u30eb
|
||||||
start=\u59cb\u307e\u308a
|
the-game-ended-in-a-draw=\u30b2\u30fc\u30e0\u306f\u5f15\u304d\u5206\u3051\u306b\u7d42\u308f\u308a\u307e\u3057\u305f
|
||||||
theme=\u30C6\u30FC\u30DE
|
theme=\u30c6\u30fc\u30de
|
||||||
tictactoe=\u30bf\u30a4\u30af\u30bf\u30c3\u30c8\u30c8\u30a6
|
tic-tac-toe=\u4e09\u76ee\u4e26\u3079
|
||||||
volume=\u30de\u30b9\u30bf\u30fc\u30dc\u30ea\u30e5\u30fc\u30e0
|
to-a-game-of=\u30b2\u30fc\u30e0\u306b
|
||||||
windowed=\u30a6\u30a3\u30f3\u30c9\u30a6
|
volume=\u97f3\u91cf
|
||||||
|
windowed=\u30a6\u30a3\u30f3\u30c9\u30a6\u8868\u793a
|
||||||
yes=\u306f\u3044
|
yes=\u306f\u3044
|
||||||
|
you-lost-against=\u3042\u306a\u305f\u306f ... \u306b\u6557\u308c\u307e\u3057\u305f
|
||||||
|
you-were-challenged-by=\u3042\u306a\u305f\u306f ... \u304b\u3089\u6311\u6226\u3055\u308c\u307e\u3057\u305f
|
||||||
|
you-win=\u52dd\u5229\u3067\u3059
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u30a2\u30e9\u30d3\u30a2\u8a9e)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u30a2\u30e9\u30d3\u30a2\u8a9e)
|
||||||
chinese=\u4e2d\u6587 (\u4e2d\u6587)
|
chinese=\u4e2d\u6587 (\u4e2d\u6587)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
ai=\uc778\uacf5 \uc9c0\ub2a5
|
accept=\uC218\uB77D
|
||||||
appTitle=ISY \uac8c\uc784 \uc120\ud0dd\uae30
|
ai=\uC778\uACF5 \uC9C0\uB2A5
|
||||||
back=\ub4a4\ub85c
|
app-title=ISY \uAC8C\uC784 \uC120\uD0DD\uAE30
|
||||||
backToMainMenu=\uBA54\uC778 \uBA54\uB274\uB85C \uB3CC\uC544\uAC00\uAE30
|
are-you-sure=\uC815\uB9D0\uB85C \uD655\uC2E4\uD569\uB2C8\uAE4C?
|
||||||
computer=\uce74\ud14c\uae4c
|
back=\uB4A4\uB85C
|
||||||
computerDifficulty=\uce74\ud14c\uae4c \ub2e8\uacc4
|
cancel=\uCDE8\uC18C
|
||||||
computerThinkTime=\uc870\ub9ac\ud558\ub294 \uc2dc\uac04
|
challenge=\uCC38\uC5EC
|
||||||
congratulations=\uCD95\uD558\uD569\uB2C8\uB2E4
|
computer-difficulty=\uCEF4\uD4E8\uD130 \uC5B4\uB9AC\uAE30
|
||||||
connect=\uc5f0\uacb0
|
computer-think-time=\uCEF4\uD4E8\uD130 \uC0DD\uAC01 \uC2DC\uAC04
|
||||||
connectionType=\uC5F0\uACB0 \uC720\uD615
|
computer=\uCEF4\uD4E8\uD130
|
||||||
credits=\uac10\uc0ac
|
connect=\uC5F0\uACB0
|
||||||
dark-hc=\uC5B4\uB460 (\uACE0 \uB300\uBE44)
|
credits=\uD06C\uB808\uB527
|
||||||
dark=\uC5B4\uB460
|
dark=\uC5B4\uB460
|
||||||
developers=\uac1c\ubc1c\uc790
|
deny=\uAC70\uBD80
|
||||||
drawText=\uAC8C\uC784\uC740 \uBB34\uC2B9\uBD84\uC73C\uB85C \uB05D\uB0AC\uC2B5\uB2C8\uB2E4
|
developers=\uAC1C\uBC1C\uC790
|
||||||
effectsVolume=\ud654\uac70 \ubc84\uc804
|
disconnect=\uC5F0\uACB0 \uC624\uD508
|
||||||
musicVolume=Music Volume (translate me)
|
effects-volume=\uD6A8\uACFC\uC74C \uBCFC\uB968
|
||||||
fullscreen=\uc804\uccb4 \ud654\uba74
|
enter-the-server-ip=\uC11C\uBC84 IP\uB97C \uC785\uB825\uD558\uC138\uC694
|
||||||
goodGameText=\uC88B\uC740 \uAC8C\uC784\uC774\uC600\uC2B5\uB2C8\uB2E4. \uC798 \uD50C\uB808\uC774\uD588\uC2B5\uB2C8\uB2E4.
|
enter-the-server-port=\uC11C\uBC84 \uD3EC\uD2B8\uB97C \uC785\uB825\uD558\uC138\uC694
|
||||||
human=\uc778\uac04
|
enter-your-name=\uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694
|
||||||
language=\uc5b8\uc5b4
|
error=\uC624\uB958
|
||||||
|
exit=\uB098\uAC00\uAE30
|
||||||
|
forfeit=\uAE30\uAD6C
|
||||||
|
fullscreen=\uC804\uCCB4 \uD654\uBA74
|
||||||
|
game-over=\uAC8C\uC784 \uC885\uB8CC
|
||||||
|
general=\uC77C\uBC18
|
||||||
|
high-contrast=\uACE0\uB3C4 \uB2E8\uC5B4
|
||||||
|
invalid-username=\uBB34\uD6A8\uD55C \uC0AC\uC6A9\uC790 \uC774\uB984
|
||||||
|
ip-address=IP \uC8FC\uC18C
|
||||||
|
is-not-a-valid-ip-address=\uC62C\uBC14\uB978 IP \uC8FC\uC18C\uAC00 \uC544\uB2D9\uB2C8\uB2E4
|
||||||
|
is-not-a-valid-port=\uC62C\uBC14\uB978 \uD3EC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4
|
||||||
|
language=\uC5B8\uC5B4
|
||||||
large=\uD070
|
large=\uD070
|
||||||
layoutSize=\uB808\uC774\uC544\uC6C3 \uD06C\uAE30
|
layout-size=\uB77C\uC774\uC6C3 \uD06C\uAE30
|
||||||
light-hc=\uBC1D\uC74C (\uACE0 \uB300\uBE44)
|
light=\uBCF4\uD1B5
|
||||||
light=\uBC1D\uC74C
|
local=\uB85C\uCEEC
|
||||||
local=\ub85c\uceec
|
localization=\uB85C\uCEEC\uB9AC\uC870
|
||||||
localization=\uc5b8\uc5b4\ud654
|
master-volume=\uBAA8\uB4E0 \uBCFC\uB968
|
||||||
medium=\uBCF4\uD1B5
|
medium=\uBCF4\uD1B5
|
||||||
mergeCommander=\uba54\uc9c0 \ucea0\ub9ac\ub354
|
merge-commander=\uBA54\uC9C0 \uCEE8\uBA38\uB2C8
|
||||||
moralSupport=\uc815\uc2e0\uc801 \uc9c0\uc6d0
|
moral-support=\uC815\uC2E0\uC801 \uC9C0\uC6D0
|
||||||
no=\uc544\ub2c8\uc624
|
music-volume=\uC74C\uC545 \uBCFC\uB968
|
||||||
|
name=\uC774\uB984
|
||||||
|
no=\uC544\uB2C8\uC624
|
||||||
|
ok=\uD655\uC778
|
||||||
|
online=\uC628\uB77C\uC778
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=\uc635\uc158
|
options=\uC635\uC158
|
||||||
othello=\uc624\ud14c\ub85c
|
play=\uC7AC\uC0DD
|
||||||
playerName=\ud50c\ub808\uc774\uc5b4 \uc774\ub984
|
player-name=\uD50C\uB808\uC774\uC5B4 \uC774\uB984
|
||||||
productOwner=\uc81c\ud488 \uad00\ub9ac\uc790
|
player=\uD50C\uB808\uC774\uC5B4
|
||||||
quit=\uc885\ub8cc
|
please-enter-your-name=\uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694
|
||||||
quitSure=\uc815\ub9d0 \uc885\ub8cc\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?
|
port=\uD3EC\uD2B8
|
||||||
scrumMaster=\uc2a4\ud06c\ub7fc \ub9c8\uc2a4\ud130
|
product-owner=\uD504\uB85C\uB354\uD2B8 \uC624\uB108
|
||||||
server=\uc11c\ubc84
|
quit=\uC885\uB8CC
|
||||||
serverIP=\uc11c\ubc84 IP
|
reversi=\uB9AC\uBC84\uC2DC
|
||||||
serverPort=\uc11c\ubc84 \ud3ec\ud2b8
|
scrum-master=\uC2A4\uD06C\uB7FC \uB9C8\uC2A4\uD130
|
||||||
small=\uC791\uC74C
|
send=\uBCF4\uB0B4\uAE30
|
||||||
start=\uc2dc\uc791
|
server-information=\uC11C\uBC84 \uC815\uBCF4
|
||||||
|
small=\uC791\uC740
|
||||||
|
style=\uC2A4\uD0C0\uC77C
|
||||||
|
the-game-ended-in-a-draw=\uAC8C\uC784\uC774 \uBB34\uC2B9\uBD80\uB85C \uC885\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4
|
||||||
theme=\uC8FC\uC81C
|
theme=\uC8FC\uC81C
|
||||||
tictactoe=\ud2f0\ud06c\ud0d0\ud1a0
|
tic-tac-toe=\uD2F0\uD06C\uD0D1\uD1A0
|
||||||
volume=\ub9c8\uc2a4\ud130 \ubcfc\ub80c
|
to-a-game-of=... \uAC8C\uC784\uC5D0
|
||||||
windowed=\ucc3d \ubaa8\ub4dc
|
volume=\uBCFC\uB968
|
||||||
yes=\ub124
|
windowed=\uCC3D \uBAA9\uB85D
|
||||||
|
yes=\uB124
|
||||||
|
you-lost-against=... \uC5D0\uAC8C \uC9C0\uC600\uC2B5\uB2C8\uB2E4
|
||||||
|
you-were-challenged-by=... \uB85C\uBD80\uD130 \uCC38\uC5EC \uC694\uCCAD\uC744 \uBC1B\uC558\uC2B5\uB2C8\uB2E4
|
||||||
|
you-win=\uC774\uACBC\uC2B5\uB2C8\uB2E4
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0639\u0631\u0628\u064a\u0629)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0639\u0631\u0628\u064a\u0629)
|
||||||
chinese=\u4e2d\u6587 (\u4e2d\u6587)
|
chinese=\u4e2d\u6587 (\u4e2d\u6587)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
|
accept=Accepteren
|
||||||
ai=Kunstmatige Intelligentie
|
ai=Kunstmatige Intelligentie
|
||||||
appTitle=ISY Spel Kiezer
|
app-title=ISY Spel Kiezer
|
||||||
|
are-you-sure=Weet je het zeker?
|
||||||
back=Terug
|
back=Terug
|
||||||
backToMainMenu=Terug naar hoofdmenu
|
cancel=Annuleren
|
||||||
|
challenge=Uitdaging
|
||||||
|
computer-difficulty=Computermoeilijkheid
|
||||||
|
computer-think-time=Denktijd computer
|
||||||
computer=Computer
|
computer=Computer
|
||||||
computerDifficulty=Computermoeilijkheid
|
|
||||||
computerThinkTime=Computer Denk Tijd
|
|
||||||
congratulations=Gefeliciteerd
|
|
||||||
connect=Verbinden
|
connect=Verbinden
|
||||||
connectionType=Verbindingstype
|
|
||||||
credits=Credits
|
credits=Credits
|
||||||
dark-hc=Donker (Hoog Contrast)
|
|
||||||
dark=Donker
|
dark=Donker
|
||||||
|
deny=Weigeren
|
||||||
developers=Ontwikkelaars
|
developers=Ontwikkelaars
|
||||||
drawText=Het spel eindigde in een gelijkspel
|
disconnect=Verbreken
|
||||||
effectsVolume=Effecten Volume
|
effects-volume=Effectvolume
|
||||||
musicVolume=Music Volume (translate me)
|
enter-the-server-ip=Voer het server-IP in
|
||||||
|
enter-the-server-port=Voer de serverpoort in
|
||||||
|
enter-your-name=Voer je naam in
|
||||||
|
error=Fout
|
||||||
|
exit=Afsluiten
|
||||||
|
forfeit=Opgeven
|
||||||
fullscreen=Volledig scherm
|
fullscreen=Volledig scherm
|
||||||
goodGameText=Goed gespeeld. Mooie wedstrijd.
|
game-over=Spel afgelopen
|
||||||
human=Mens
|
general=Algemeen
|
||||||
|
high-contrast=Hoog contrast
|
||||||
|
invalid-username=ongeldige gebruikersnaam
|
||||||
|
ip-address=IP-adres
|
||||||
|
is-not-a-valid-ip-address=is geen geldig IP-adres
|
||||||
|
is-not-a-valid-port=is geen geldige poort
|
||||||
language=Taal
|
language=Taal
|
||||||
large=Groot
|
large=Groot
|
||||||
layoutSize=Lay-outgrootte
|
layout-size=Lay-outgrootte
|
||||||
light-hc=Licht (Hoog Contrast)
|
|
||||||
light=Licht
|
light=Licht
|
||||||
local=Lokaal
|
local=Lokaal
|
||||||
localization=Lokalisatie
|
localization=Lokalisatie
|
||||||
medium=Middel
|
master-volume=Hoofdvolume
|
||||||
mergeCommander=Merge-commandant
|
medium=Middelgroot
|
||||||
moralSupport=Moraalsteun
|
merge-commander=Merge Commander
|
||||||
|
moral-support=Morele steun
|
||||||
|
music-volume=Muziekvolume
|
||||||
|
name=Naam
|
||||||
no=Nee
|
no=Nee
|
||||||
|
ok=Ok<EFBFBD>
|
||||||
|
online=Online
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=Opties
|
options=Opties
|
||||||
othello=Othello
|
play=Spelen
|
||||||
playerName=Spelernaam
|
player-name=Spelersnaam
|
||||||
productOwner=Producteigenaar
|
player=Speler
|
||||||
quit=Afsluiten
|
please-enter-your-name=Voer alstublieft je naam in
|
||||||
quitSure=Weet je het zeker?
|
port=Poort
|
||||||
scrumMaster=Scrum Master
|
product-owner=Producteigenaar
|
||||||
server=Server
|
quit=Stoppen
|
||||||
serverIP=Server-IP
|
reversi=Reversi
|
||||||
serverPort=Serverpoort
|
scrum-master=Scrum Master
|
||||||
|
send=Verzenden
|
||||||
|
server-information=Serverinformatie
|
||||||
small=Klein
|
small=Klein
|
||||||
start=Start
|
style=Stijl
|
||||||
|
the-game-ended-in-a-draw=Het spel eindigde in een gelijkspel
|
||||||
theme=Thema
|
theme=Thema
|
||||||
tictactoe=Boter Kaas en Eieren
|
tic-tac-toe=Boter Kaas en Eieren
|
||||||
volume=Hoofdvolume
|
to-a-game-of=voor een spelletje
|
||||||
|
volume=Volume
|
||||||
windowed=Venstermodus
|
windowed=Venstermodus
|
||||||
yes=Ja
|
yes=Ja
|
||||||
|
you-lost-against=Je hebt verloren van
|
||||||
|
you-were-challenged-by=Je bent uitgedaagd door
|
||||||
|
you-win=Je wint
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabisch)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (Arabisch)
|
||||||
chinese=\u4e2d\u6587 (Chinees)
|
chinese=\u4e2d\u6587 (Chinees)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
|
accept=\u041f\u0440\u0438\u043d\u044f\u0442\u044c
|
||||||
ai=\u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442
|
ai=\u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442
|
||||||
appTitle=ISY \u0412\u044b\u0431\u043e\u0440 \u0438\u0433\u0440
|
app-title=ISY \u0412\u044b\u0431\u043e\u0440 \u0438\u0433\u0440
|
||||||
|
are-you-sure=\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b?
|
||||||
back=\u041d\u0430\u0437\u0430\u0434
|
back=\u041d\u0430\u0437\u0430\u0434
|
||||||
backToMainMenu=\u041D\u0430\u0437\u0430\u0434 \u0432 \u0433\u043B\u0430\u0432\u043D\u043E\u0435 \u043C\u0435\u043D\u044E
|
cancel=\u041e\u0442\u043c\u0435\u043d\u0430
|
||||||
|
challenge=\u0412\u044b\u0437\u043e\u0432
|
||||||
|
computer-difficulty=\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430
|
||||||
|
computer-think-time=\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430
|
||||||
computer=\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440
|
computer=\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440
|
||||||
computerDifficulty=\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430
|
|
||||||
computerThinkTime=\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0434\u0443\u043c\u044b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430
|
|
||||||
congratulations=\u041F\u043E\u0437\u0434\u0440\u0430\u0432\u043B\u044F\u0435\u043C
|
|
||||||
connect=\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f
|
connect=\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f
|
||||||
connectionType=\u0442\u0438\u043F \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F
|
credits=\u041a\u0440\u0435\u0434\u0438\u0442\u044b
|
||||||
credits=\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u0438
|
dark=\u0422\u0451\u043c\u043d\u044b\u0439
|
||||||
dark-hc=\u0442\u0451\u043C\u043D\u044B\u0439 (\u0432\u044B\u0441\u043E\u043A\u0438\u0439 \u043A\u043E\u043D\u0442\u0440\u0430\u0441\u0442)
|
deny=\u041e\u0442\u043a\u0430\u0437\u0430\u0442\u044c
|
||||||
dark=\u0442\u0451\u043C\u043D\u044B\u0439
|
|
||||||
developers=\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438
|
developers=\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438
|
||||||
drawText=\u0418\u0433\u0440\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0430\u0441\u044C \u043D\u0438\u0447\u044C\u0435\u0439
|
disconnect=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f
|
||||||
effectsVolume=\u042d\u0444\u0444\u0435\u043a\u0442\u044b \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c
|
effects-volume=\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432
|
||||||
musicVolume=Music Volume (translate me)
|
enter-the-server-ip=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 IP \u0441\u0435\u0440\u0432\u0435\u0440\u0430
|
||||||
|
enter-the-server-port=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430
|
||||||
|
enter-your-name=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0438\u043c\u044f
|
||||||
|
error=\u041e\u0448\u0438\u0431\u043a\u0430
|
||||||
|
exit=\u0412\u044b\u0445\u043e\u0434
|
||||||
|
forfeit=\u0421\u0434\u0430\u0442\u044c \u0441\u043e\u0440\u043e\u0432\u043d\u043e\u0441\u0442\u0438
|
||||||
fullscreen=\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c
|
fullscreen=\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c
|
||||||
goodGameText=\u0425\u043E\u0440\u043E\u0448\u0430\u044F \u0438\u0433\u0440\u0430. \u0425\u043E\u0440\u043E\u0448\u043E \u0441\u044B\u0433\u0440\u0430\u043D\u043E.
|
game-over=\u0418\u0433\u0440\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430
|
||||||
human=\u0427\u0435\u043b\u043e\u0432\u0435\u043a
|
general=\u041e\u0431\u0449\u0438\u0435
|
||||||
|
high-contrast=\u0412\u044B\u0441\u043E\u043A\u0430\u044F \u043A\u043E\u043D\u0442\u0440\u0430\u0441\u0442\u043D\u043E\u0441\u0442\u044C
|
||||||
|
invalid-username=\u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0438\u043c\u044f
|
||||||
|
ip-address=IP \u0430\u0434\u0440\u0435\u0441
|
||||||
|
is-not-a-valid-ip-address=\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c IP \u0430\u0434\u0440\u0435\u0441\u043e\u043c
|
||||||
|
is-not-a-valid-port=\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0440\u0442\u043e\u043c
|
||||||
language=\u042f\u0437\u044b\u043a
|
language=\u042f\u0437\u044b\u043a
|
||||||
large=\u0431\u043E\u043B\u044C\u0448\u043E\u0439
|
large=\u0411\u043e\u043b\u044c\u0448\u043e\u0439
|
||||||
layoutSize=\u0440\u0430\u0437\u043C\u0435\u0440 \u043C\u0430\u043A\u0435\u0442\u0430
|
layout-size=\u0420\u0430\u0437\u043c\u0435\u0440 \u043c\u043e\u043d\u0442\u0430\u0436\u0430
|
||||||
light-hc=\u0441\u0432\u0435\u0442\u043B\u044B\u0439 (\u0432\u044B\u0441\u043E\u043A\u0438\u0439 \u043A\u043E\u043D\u0442\u0440\u0430\u0441\u0442)
|
light=\u0421\u0432\u0435\u0442\u043b\u044b\u0439
|
||||||
light=\u0441\u0432\u0435\u0442\u043B\u044B\u0439
|
|
||||||
local=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439
|
local=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439
|
||||||
localization=\u041b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f
|
localization=\u041b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f
|
||||||
medium=\u0441\u0440\u0435\u0434\u043D\u0438\u0439
|
master-volume=\u041e\u0431\u0449\u0438\u0439 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c
|
||||||
mergeCommander=\u041a\u043e\u043c\u0430\u043d\u0434\u0435\u0440 \u0441\u043b\u0438\u044f\u043d\u0438\u044f
|
medium=\u0421\u0440\u0435\u0434\u043d\u0438\u0439
|
||||||
moralSupport=\u041c\u043e\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430
|
merge-commander=Merge Commander
|
||||||
|
moral-support=\u041c\u043e\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430
|
||||||
|
music-volume=\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c \u043c\u0443\u0437\u044b\u043a\u0438
|
||||||
|
name=\u0418\u043c\u044f
|
||||||
no=\u041d\u0435\u0442
|
no=\u041d\u0435\u0442
|
||||||
|
ok=OK
|
||||||
|
online=\u0412 \u0441\u0435\u0442\u0438
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
|
options=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
|
||||||
othello=\u041e\u0442\u0435\u043b\u043b\u043e
|
play=\u0418\u0433\u0440\u0430\u0442\u044c
|
||||||
playerName=\u0418\u043c\u044f \u0438\u0433\u0440\u043e\u043a\u0430
|
player-name=\u0418\u043c\u044f \u0438\u0433\u0440\u043e\u043a\u0430
|
||||||
productOwner=\u0412\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430
|
player=\u0418\u0433\u0440\u043e\u043a
|
||||||
|
please-enter-your-name=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0438\u043c\u044f
|
||||||
|
port=\u041f\u043e\u0440\u0442
|
||||||
|
product-owner=\u0412\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430
|
||||||
quit=\u0412\u044b\u0445\u043e\u0434
|
quit=\u0412\u044b\u0445\u043e\u0434
|
||||||
quitSure=\u0423\u0432\u0435\u0440\u0435\u043d\u044b \u043b\u0438?
|
reversi=\u0420\u0435\u0432\u0435\u0440\u0441\u0438
|
||||||
scrumMaster=\u041c\u0430\u0441\u0442\u0435\u0440 Scrum
|
scrum-master=Scrum Master
|
||||||
server=\u0421\u0435\u0440\u0432\u0435\u0440
|
send=\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c
|
||||||
serverIP=\u0418\u043f\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430
|
server-information=\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0435
|
||||||
serverPort=\u041f\u043e\u0440\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430
|
small=\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439
|
||||||
small=\u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0438\u0439
|
style=\u0421\u0442\u0438\u043b\u044c
|
||||||
start=\u0421\u0442\u0430\u0440\u0442
|
the-game-ended-in-a-draw=\u0418\u0433\u0440\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c \u043d\u0438\u0447\u044c\u0435\u0439
|
||||||
theme=\u0442\u0435\u043C\u0430
|
theme=\u0422\u0435\u043c\u0430
|
||||||
tictactoe=\u041a\u0440\u0435\u0441\u0442\u0438\u043a\u0438
|
tic-tac-toe=\u041a\u0440\u0435\u0441\u0442\u0438\u043a\u043e
|
||||||
volume=\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c
|
to-a-game-of=\u043a \u0438\u0433\u0440\u0435 \u0432
|
||||||
|
volume=\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c
|
||||||
windowed=\u041e\u043a\u043d\u043e
|
windowed=\u041e\u043a\u043d\u043e
|
||||||
yes=\u0414\u0430
|
yes=\u0414\u0430
|
||||||
|
you-lost-against=\u0412\u044b \u043f\u0440\u043e\u0438\u0433\u0440\u0430\u043b\u0438 \u043a\u043e\u043c\u0443
|
||||||
|
you-were-challenged-by=\u0412\u0430\u0441 \u0432\u044b\u0437\u0432\u0430\u043b \u043d\u0430 \u0441\u043e\u0440\u0435\u0432\u043d\u0438\u043a
|
||||||
|
you-win=\u0412\u044b \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442\u0435
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0410\u0440\u0430\u0431\u0441\u043a\u0438\u0439)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0410\u0440\u0430\u0431\u0441\u043a\u0438\u0439)
|
||||||
chinese=\u4e2d\u6587 (\u041a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439)
|
chinese=\u4e2d\u6587 (\u041a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439)
|
||||||
|
|||||||
@@ -1,52 +1,74 @@
|
|||||||
|
accept=\u63a5\u53d7
|
||||||
ai=\u4eba\u5de5\u667a\u80fd
|
ai=\u4eba\u5de5\u667a\u80fd
|
||||||
appTitle=ISY \u6e38\u620f\u9009\u62e9\u5668
|
app-title=ISY \u6e38\u620f\u9009\u62e9\u5668
|
||||||
|
are-you-sure=\u60a8\u786e\u5b9a\u5417\uff1f
|
||||||
back=\u8fd4\u56de
|
back=\u8fd4\u56de
|
||||||
backToMainMenu=\u8FD4\u56DE\u4E3B\u83DC\u5355
|
cancel=\u53d6\u6d88
|
||||||
|
challenge=\u6311\u6218
|
||||||
|
computer-difficulty=\u8ba1\u7b97\u673a\u96be\u5ea6
|
||||||
|
computer-think-time=\u8ba1\u7b97\u673a\u601d\u8003\u65f6\u95f4
|
||||||
computer=\u8ba1\u7b97\u673a
|
computer=\u8ba1\u7b97\u673a
|
||||||
computerDifficulty=\u8ba1\u7b97\u673a\u96be\u5ea6
|
|
||||||
computerThinkTime=\u7535\u8111\u8003\u616e\u65f6\u95f4
|
|
||||||
congratulations=\u606D\u559C
|
|
||||||
connect=\u8fde\u63a5
|
connect=\u8fde\u63a5
|
||||||
connectionType=\u8FDE\u63A5\u7C7B\u578B
|
credits=\u81f4\u8c22
|
||||||
credits=\u6b23\u8d4f
|
dark=\u6697\u8272
|
||||||
dark-hc=\u6697 (\u9AD8\u5BF9\u6BD4)
|
deny=\u62d2\u7edd
|
||||||
dark=\u6697
|
|
||||||
developers=\u5f00\u53d1\u8005
|
developers=\u5f00\u53d1\u8005
|
||||||
drawText=\u6E38\u620F\u4EE5\u5E73\u5C40\u7ED3\u675F
|
disconnect=\u65ad\u5f00\u8fde\u63a5
|
||||||
effectsVolume=\u6548\u679c\u91cf
|
effects-volume=\u6548\u679c\u97f3\u91cf
|
||||||
musicVolume=Music Volume (translate me)
|
enter-the-server-ip=\u8f93\u5165\u670d\u52a1\u5668 IP
|
||||||
|
enter-the-server-port=\u8f93\u5165\u670d\u52a1\u5668\u7aef\u53e3
|
||||||
|
enter-your-name=\u8f93\u5165\u60a8\u7684\u540d\u5b57
|
||||||
|
error=\u9519\u8bef
|
||||||
|
exit=\u9000\u51fa
|
||||||
|
forfeit=\u68c0\u8f93
|
||||||
fullscreen=\u5168\u5c4f
|
fullscreen=\u5168\u5c4f
|
||||||
goodGameText=\u6E38\u620F\u5F88\u597D. \u8868\u73B0\u4F18\u79C0.
|
game-over=\u6e38\u620f\u7ed3\u675f
|
||||||
human=\u4eba
|
general=\u901a\u7528
|
||||||
|
high-contrast=\u9AD8\u5BF9\u6BD4\u5EA6
|
||||||
|
invalid-username=\u7528\u6237\u540d\u65e0\u6548
|
||||||
|
ip-address=IP \u5730\u5740
|
||||||
|
is-not-a-valid-ip-address=\u4e0d\u662f\u6709\u6548\u7684 IP \u5730\u5740
|
||||||
|
is-not-a-valid-port=\u4e0d\u662f\u6709\u6548\u7684\u7aef\u53e3
|
||||||
language=\u8bed\u8a00
|
language=\u8bed\u8a00
|
||||||
large=\u5927
|
large=\u5927
|
||||||
layoutSize=\u5E03\u5C40\u5927\u5C0F
|
layout-size=\u5e03\u5c40\u5927\u5c0f
|
||||||
light-hc=\u4EAE (\u9AD8\u5BF9\u6BD4)
|
light=\u4eae\u8272
|
||||||
light=\u4EAE
|
|
||||||
local=\u672c\u5730
|
local=\u672c\u5730
|
||||||
localization=\u6d88\u606f\u5c55\u793a / \u672c\u5730\u5316
|
localization=\u672c\u5730\u5316
|
||||||
medium=\u4E2D
|
master-volume=\u603b\u97f3\u91cf
|
||||||
mergeCommander=Merge \u63a7\u4e3b
|
medium=\u4e2d
|
||||||
moralSupport=\u795e\u7cbe\u652f\u6301
|
merge-commander=\u5408\u5e76\u6307\u6325
|
||||||
no=\u5426
|
moral-support=\u7cbe\u795e\u652f\u6301
|
||||||
|
music-volume=\u97f3\u4e50\u97f3\u91cf
|
||||||
|
name=\u540d\u5b57
|
||||||
|
no=\u4e0d
|
||||||
|
ok=\u786e\u5b9a
|
||||||
|
online=\u5728\u7ebf
|
||||||
opengl=OpenGL
|
opengl=OpenGL
|
||||||
options=\u9009\u9879
|
options=\u9009\u9879
|
||||||
othello=Othello
|
play=\u6e38\u73a9
|
||||||
playerName=\u73a9\u5bb6\u540d\u79f0
|
player-name=\u73a9\u5bb6\u540d
|
||||||
productOwner=\u54c1\u76d8\u4ea7\u54c1\u4eba
|
player=\u73a9\u5bb6
|
||||||
|
please-enter-your-name=\u8bf7\u8f93\u5165\u60a8\u7684\u540d\u5b57
|
||||||
|
port=\u7aef\u53e3
|
||||||
|
product-owner=\u4ea7\u54c1\u62e5\u6709\u8005
|
||||||
quit=\u9000\u51fa
|
quit=\u9000\u51fa
|
||||||
quitSure=\u4f60\u786e\u5b9a\u5417?
|
reversi=\u9ed1\u767d\u68cb
|
||||||
scrumMaster=Scrum \u4f1a\u5458
|
scrum-master=\u9879\u76ee\u7ecf\u7406
|
||||||
server=\u670d\u52a1\u5668
|
send=\u53d1\u9001
|
||||||
serverIP=\u670d\u52a1\u5668 IP
|
server-information=\u670d\u52a1\u5668\u4fe1\u606f
|
||||||
serverPort=\u670d\u52a1\u5668 \u7aef\u53e3
|
small=\u5c0f
|
||||||
small=\u5C0F
|
style=\u98ce\u683c
|
||||||
start=\u5f00\u59cb
|
the-game-ended-in-a-draw=\u6e38\u620f\u4ee5\u548c\u5c40\u7ed3\u675f
|
||||||
theme=\u4E3B\u9898
|
theme=\u4e3b\u9898
|
||||||
tictactoe=Tic Tac Toe
|
tic-tac-toe=\u4e09\u5b9a\u7ebf
|
||||||
volume=\u4e3b\u97f3\u91cf
|
to-a-game-of=\u6311\u6218\u4e00\u573a
|
||||||
|
volume=\u97f3\u91cf
|
||||||
windowed=\u7a97\u53e3\u6a21\u5f0f
|
windowed=\u7a97\u53e3\u6a21\u5f0f
|
||||||
yes=\u662f
|
yes=\u662f
|
||||||
|
you-lost-against=\u60a8\u8f93\u7ed9\u4e86
|
||||||
|
you-were-challenged-by=\u60a8\u88ab\u6311\u6218\u81ea
|
||||||
|
you-win=\u60a8\u83b7\u80dc\u4e86
|
||||||
|
|
||||||
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u963f\u62c9\u4f2f\u8bed)
|
arabic=\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u963f\u62c9\u4f2f\u8bed)
|
||||||
chinese=\u4e2d\u6587
|
chinese=\u4e2d\u6587
|
||||||
|
|||||||
@@ -1,215 +0,0 @@
|
|||||||
/* ----------------------------
|
|
||||||
.background
|
|
||||||
----------------------------- */
|
|
||||||
.bg-primary {
|
|
||||||
-fx-background-color: #0a0a0a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-secondary {
|
|
||||||
-fx-background-color: #1a1a1a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-popup {
|
|
||||||
-fx-background-color: #0a0a0acc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.button
|
|
||||||
----------------------------- */
|
|
||||||
.button {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 10 20;
|
|
||||||
-fx-background-radius: 6;
|
|
||||||
-fx-cursor: hand;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #1a1a1a;
|
|
||||||
-fx-text-fill: #ffffff;
|
|
||||||
-fx-border-color: #ffffff;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
|
|
||||||
/* Effects */
|
|
||||||
-fx-effect: dropshadow(gaussian, #00000099, 4, 0, 0, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.button:hover {
|
|
||||||
-fx-background-color: #2a2a2a;
|
|
||||||
-fx-border-color: #00ff00;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.choice-box
|
|
||||||
----------------------------- */
|
|
||||||
.choice-box {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 6;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #1a1a1a;
|
|
||||||
-fx-border-color: #ffffff;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
-fx-mark-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box:hover {
|
|
||||||
-fx-border-color: #00ff00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box:focused {
|
|
||||||
-fx-border-color: #00cc66;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .label {
|
|
||||||
-fx-text-fill: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.choice-box popup styling
|
|
||||||
----------------------------- */
|
|
||||||
.choice-box .context-menu {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 4;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #1a1a1a;
|
|
||||||
-fx-border-color: #ffffff;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .menu-item {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 6 12;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .menu-item .label {
|
|
||||||
-fx-text-fill: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .menu-item:hover {
|
|
||||||
-fx-background-color: #2a2a2a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .menu-item:focused {
|
|
||||||
-fx-background-color: #00ff00;
|
|
||||||
-fx-text-fill: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.container
|
|
||||||
----------------------------- */
|
|
||||||
.container {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 10;
|
|
||||||
-fx-alignment: center;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #1a1a1a;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.input
|
|
||||||
----------------------------- */
|
|
||||||
.input {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 8;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #1a1a1a;
|
|
||||||
-fx-text-fill: #ffffff;
|
|
||||||
-fx-border-color: #ffffff;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input:hover {
|
|
||||||
-fx-border-color: #00ff00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input:focused {
|
|
||||||
-fx-border-color: #00cc66;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.separator
|
|
||||||
----------------------------- */
|
|
||||||
.separator {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 10 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.separator .line {
|
|
||||||
/* Color */
|
|
||||||
-fx-border-color: #ffffff;
|
|
||||||
-fx-border-width: 0 0 1 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.slider
|
|
||||||
----------------------------- */
|
|
||||||
.slider {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 6 0;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider .track {
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: linear-gradient(to left, #00ff00, #ff0000);
|
|
||||||
-fx-background-insets: 0;
|
|
||||||
-fx-background-radius: 2;
|
|
||||||
-fx-pref-height: 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider .thumb {
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #ffffff;
|
|
||||||
-fx-background-radius: 50%;
|
|
||||||
|
|
||||||
/* Effects */
|
|
||||||
-fx-effect: dropshadow(gaussian, #000000aa, 4, 0, 0, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider .thumb:hover {
|
|
||||||
-fx-scale-x: 1.2;
|
|
||||||
-fx-scale-y: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.text-header
|
|
||||||
----------------------------- */
|
|
||||||
.text-header {
|
|
||||||
-fx-fill: #ffffff;
|
|
||||||
-fx-text-fill: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.text-normal
|
|
||||||
----------------------------- */
|
|
||||||
.text-normal {
|
|
||||||
-fx-fill: #f0f0f0;
|
|
||||||
-fx-text-fill: #f0f0f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.toggle-button
|
|
||||||
----------------------------- */
|
|
||||||
.toggle {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 8 16;
|
|
||||||
-fx-background-radius: 6;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #1f1f1f;
|
|
||||||
-fx-text-fill: #ffffff;
|
|
||||||
-fx-border-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle:hover {
|
|
||||||
-fx-background-color: #00ff00;
|
|
||||||
-fx-text-fill: #000000;
|
|
||||||
-fx-border-color: #00ff00;
|
|
||||||
}
|
|
||||||
@@ -1,215 +1,139 @@
|
|||||||
/* ----------------------------
|
|
||||||
.background
|
|
||||||
----------------------------- */
|
|
||||||
.bg-primary {
|
.bg-primary {
|
||||||
-fx-background-color: #181818;
|
-fx-background-color: linear-gradient(to bottom, #2a3a45, #1c2730);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-secondary {
|
.bg-secondary {
|
||||||
-fx-background-color: #2a2a2a;
|
-fx-background-color: linear-gradient(to bottom, #3b4a57, #2a3742);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-popup {
|
.bg-popup {
|
||||||
-fx-background-color: #1818187f;
|
-fx-background-color: rgba(20, 40, 55, 0.9);
|
||||||
|
-fx-background-radius: 8;
|
||||||
|
-fx-effect: dropshadow(gaussian, #224455cc, 8, 0, 0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.button
|
|
||||||
----------------------------- */
|
|
||||||
.button {
|
.button {
|
||||||
/* Layout */
|
-fx-background-color: linear-gradient(to bottom, #1f5e20, #2e7d2e);
|
||||||
-fx-padding: 10 20;
|
-fx-background-radius: 8;
|
||||||
-fx-background-radius: 6;
|
-fx-border-color: #3caf3f;
|
||||||
-fx-cursor: hand;
|
-fx-cursor: hand;
|
||||||
|
-fx-effect: dropshadow(gaussian, #3caf3fdd, 6, 0, 0, 2);
|
||||||
/* Color */
|
-fx-text-fill: #e0f2e9;
|
||||||
-fx-background-color: #2a2a2a;
|
-fx-font-weight: bold;
|
||||||
-fx-text-fill: #f0f0f0;
|
|
||||||
-fx-border-color: #3a3a3a;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
|
|
||||||
/* Effects */
|
|
||||||
-fx-effect: dropshadow(gaussian, #0000004d, 4, 0, 0, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:hover {
|
.button:hover {
|
||||||
-fx-background-color: #3a3a3a;
|
-fx-background-color: linear-gradient(to bottom, #44a044, #57b257);
|
||||||
-fx-border-color: #4caf50;
|
-fx-border-color: #2f7d2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
.combo-box {
|
||||||
.choice-box
|
-fx-background-color: linear-gradient(to bottom, #3c5155, #2a3a3e);
|
||||||
----------------------------- */
|
-fx-background-radius: 6;
|
||||||
.choice-box {
|
-fx-border-color: #3caf3f;
|
||||||
/* Layout */
|
-fx-cursor: hand;
|
||||||
-fx-padding: 6;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #2a2a2a;
|
|
||||||
-fx-border-color: #444444;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
-fx-mark-color: #f0f0f0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box:hover {
|
.combo-box:hover {
|
||||||
-fx-border-color: #4caf50;
|
-fx-border-color: #55a755;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box:focused {
|
.combo-box:focused {
|
||||||
-fx-border-color: #81c784;
|
-fx-border-color: #88cc88;
|
||||||
|
-fx-effect: dropshadow(gaussian, #88cc8899, 5, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .label {
|
.combo-box .arrow,
|
||||||
-fx-text-fill: #f0f0f0;
|
.combo-box .arrow-button {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-border-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
.combo-box .list-cell {
|
||||||
.choice-box popup styling
|
-fx-background-color: transparent;
|
||||||
----------------------------- */
|
-fx-text-fill: #a8d0a8;
|
||||||
.choice-box .context-menu {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 4;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #2a2a2a;
|
|
||||||
-fx-border-color: #444444;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .menu-item {
|
.combo-box .list-view {
|
||||||
/* Layout */
|
-fx-background-color: #264233;
|
||||||
-fx-padding: 6 12;
|
-fx-background-radius: 6;
|
||||||
|
-fx-border-color: #3caf3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .menu-item .label {
|
.combo-box-popup .list-cell {
|
||||||
-fx-text-fill: #dddddd;
|
-fx-text-fill: #a8d0a8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .menu-item:hover {
|
.combo-box-popup .list-cell:hover {
|
||||||
-fx-background-color: #3a3a3a;
|
-fx-background-color: #44a044;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .menu-item:focused {
|
.combo-box-popup .list-cell:selected {
|
||||||
-fx-background-color: #4caf50;
|
-fx-background-color: #2e7d2e;
|
||||||
-fx-text-fill: #ffffff;
|
-fx-text-fill: #e0f2e9;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.container
|
|
||||||
----------------------------- */
|
|
||||||
.container {
|
.container {
|
||||||
/* Layout */
|
-fx-background-color: linear-gradient(to bottom, #2b3a3e, #1a2224);
|
||||||
-fx-padding: 10;
|
-fx-background-radius: 6;
|
||||||
-fx-alignment: center;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #2a2a2a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.input
|
|
||||||
----------------------------- */
|
|
||||||
.input {
|
.input {
|
||||||
/* Layout */
|
-fx-background-color: linear-gradient(to bottom, #1f3a3b, #124040);
|
||||||
-fx-padding: 8;
|
-fx-background-radius: 6;
|
||||||
-fx-background-radius: 4;
|
-fx-border-color: #3caf3f;
|
||||||
|
-fx-text-fill: #a8d0a8;
|
||||||
/* Color */
|
-fx-font-weight: normal;
|
||||||
-fx-background-color: #2a2a2a;
|
|
||||||
-fx-text-fill: #f0f0f0;
|
|
||||||
-fx-border-color: #444444;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input:hover {
|
.input:hover {
|
||||||
-fx-border-color: #4caf50;
|
-fx-border-color: #55a755;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input:focused {
|
.input:focused {
|
||||||
-fx-border-color: #81c784;
|
-fx-border-color: #88cc88;
|
||||||
|
-fx-effect: dropshadow(gaussian, #88cc8899, 5, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
.my-turn {
|
||||||
.separator
|
-fx-fill: #e05656;
|
||||||
----------------------------- */
|
-fx-font-weight: bold;
|
||||||
.separator {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 10 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.separator .line {
|
.separator .line {
|
||||||
/* Color */
|
-fx-border-color: #55a755;
|
||||||
-fx-border-color: #3a3a3a;
|
-fx-opacity: 1;
|
||||||
-fx-border-width: 0 0 1 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.slider
|
|
||||||
----------------------------- */
|
|
||||||
.slider {
|
.slider {
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 6 0;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: transparent;
|
-fx-background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider .track {
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: linear-gradient(to left, #4caf50, #f44336);
|
|
||||||
-fx-background-insets: 0;
|
|
||||||
-fx-background-radius: 2;
|
|
||||||
-fx-pref-height: 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider .thumb {
|
.slider .thumb {
|
||||||
/* Color */
|
-fx-background-color: linear-gradient(to bottom, #2e7d2e, #44a044);
|
||||||
-fx-background-color: #f0f0f0;
|
|
||||||
-fx-background-radius: 50%;
|
-fx-background-radius: 50%;
|
||||||
|
-fx-effect: dropshadow(gaussian, #3caf3fdd, 5, 0, 0, 1);
|
||||||
/* Effects */
|
|
||||||
-fx-effect: dropshadow(gaussian, #00000066, 4, 0, 0, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider .thumb:hover {
|
.slider .thumb:hover {
|
||||||
-fx-scale-x: 1.2;
|
-fx-scale-x: 1.15;
|
||||||
-fx-scale-y: 1.2;
|
-fx-scale-y: 1.15;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
.slider .track {
|
||||||
.text-header
|
-fx-background-color: linear-gradient(to left, #57b257, #e05c5c);
|
||||||
----------------------------- */
|
-fx-background-insets: 0;
|
||||||
.text-header {
|
|
||||||
-fx-fill: #f0f0f0;
|
|
||||||
-fx-text-fill: #f0f0f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.text-normal
|
|
||||||
----------------------------- */
|
|
||||||
.text-normal {
|
|
||||||
-fx-fill: #dddddd;
|
|
||||||
-fx-text-fill: #dddddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.toggle-button
|
|
||||||
----------------------------- */
|
|
||||||
.toggle {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 8 16;
|
|
||||||
-fx-background-radius: 6;
|
-fx-background-radius: 6;
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #333333;
|
|
||||||
-fx-text-fill: #cccccc;
|
|
||||||
-fx-border-color: #4a4a4a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle:hover {
|
.text {
|
||||||
-fx-background-color: #4caf50;
|
-fx-fill: #a8d0a8;
|
||||||
-fx-text-fill: #ffffff;
|
-fx-font-weight: normal;
|
||||||
-fx-border-color: #4caf50;
|
-fx-text-fill: #a8d0a8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
-fx-fill: #88cc88;
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
-fx-text-fill: #88cc88;
|
||||||
}
|
}
|
||||||
41
app/src/main/resources/assets/style/general.css
Normal file
41
app/src/main/resources/assets/style/general.css
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
.combo-box .list-cell {
|
||||||
|
-fx-alignment: CENTER;
|
||||||
|
-fx-padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container,
|
||||||
|
.credits-container {
|
||||||
|
-fx-alignment: TOP_CENTER;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fit {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fit .scroll-bar .decrement-arrow,
|
||||||
|
.fit .scroll-bar .decrement-button,
|
||||||
|
.fit .scroll-bar .increment-arrow,
|
||||||
|
.fit .scroll-bar .increment-button {
|
||||||
|
-fx-padding: 0;
|
||||||
|
-fx-pref-height: 0;
|
||||||
|
-fx-pref-width: 0;
|
||||||
|
-fx-shape: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fit .scroll-bar .thumb {
|
||||||
|
-fx-background-color: #888;
|
||||||
|
-fx-background-insets: 0;
|
||||||
|
-fx-background-radius: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fit .scroll-bar:horizontal,
|
||||||
|
.fit .scroll-bar:vertical {
|
||||||
|
-fx-pref-height: 4px;
|
||||||
|
-fx-pref-width: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header,
|
||||||
|
.text {
|
||||||
|
-fx-font-family: "Arial";
|
||||||
|
}
|
||||||
139
app/src/main/resources/assets/style/high-contrast.css
Normal file
139
app/src/main/resources/assets/style/high-contrast.css
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
.bg-primary {
|
||||||
|
-fx-background-color: linear-gradient(to bottom, #121b22, #0a0f14);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-secondary {
|
||||||
|
-fx-background-color: linear-gradient(to bottom, #1a2b35, #0d181f);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-popup {
|
||||||
|
-fx-background-color: rgba(10, 20, 30, 0.95);
|
||||||
|
-fx-background-radius: 8;
|
||||||
|
-fx-effect: dropshadow(gaussian, #1f6a22ff, 10, 0, 0, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
-fx-background-color: linear-gradient(to bottom, #1b7a1b, #2da32d);
|
||||||
|
-fx-background-radius: 8;
|
||||||
|
-fx-border-color: #28a428;
|
||||||
|
-fx-cursor: hand;
|
||||||
|
-fx-effect: dropshadow(gaussian, #28a428ff, 8, 0, 0, 3);
|
||||||
|
-fx-text-fill: #e0ffe0;
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button:hover {
|
||||||
|
-fx-background-color: linear-gradient(to bottom, #45d045, #60e060);
|
||||||
|
-fx-border-color: #1c841c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box {
|
||||||
|
-fx-background-color: linear-gradient(to bottom, #26473b, #1a2e25);
|
||||||
|
-fx-background-radius: 6;
|
||||||
|
-fx-border-color: #28a428;
|
||||||
|
-fx-cursor: hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box:hover {
|
||||||
|
-fx-border-color: #52c352;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box:focused {
|
||||||
|
-fx-border-color: #70e070;
|
||||||
|
-fx-effect: dropshadow(gaussian, #70e070cc, 6, 0, 0, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box .arrow,
|
||||||
|
.combo-box .arrow-button {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box .list-cell {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-text-fill: #a8f0a8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box .list-view {
|
||||||
|
-fx-background-color: #16321f;
|
||||||
|
-fx-background-radius: 6;
|
||||||
|
-fx-border-color: #28a428;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box-popup .list-cell {
|
||||||
|
-fx-text-fill: #a8f0a8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box-popup .list-cell:hover {
|
||||||
|
-fx-background-color: #45d045;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box-popup .list-cell:selected {
|
||||||
|
-fx-background-color: #2da32d;
|
||||||
|
-fx-text-fill: #f0fff0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
-fx-background-color: linear-gradient(to bottom, #121e1c, #0c1210);
|
||||||
|
-fx-background-radius: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
-fx-background-color: linear-gradient(to bottom, #15331a, #0e2b15);
|
||||||
|
-fx-background-radius: 6;
|
||||||
|
-fx-border-color: #28a428;
|
||||||
|
-fx-text-fill: #a8f0a8;
|
||||||
|
-fx-font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input:hover {
|
||||||
|
-fx-border-color: #52c352;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input:focused {
|
||||||
|
-fx-border-color: #70e070;
|
||||||
|
-fx-effect: dropshadow(gaussian, #70e070cc, 6, 0, 0, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-turn {
|
||||||
|
-fx-fill: #ff4b4b;
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.separator .line {
|
||||||
|
-fx-border-color: #52c352;
|
||||||
|
-fx-opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider .thumb {
|
||||||
|
-fx-background-color: linear-gradient(to bottom, #2da32d, #45d045);
|
||||||
|
-fx-background-radius: 50%;
|
||||||
|
-fx-effect: dropshadow(gaussian, #28a428ff, 6, 0, 0, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider .thumb:hover {
|
||||||
|
-fx-scale-x: 1.15;
|
||||||
|
-fx-scale-y: 1.15;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider .track {
|
||||||
|
-fx-background-color: linear-gradient(to left, #60e060, #ff5555);
|
||||||
|
-fx-background-insets: 0;
|
||||||
|
-fx-background-radius: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
-fx-fill: #a8f0a8;
|
||||||
|
-fx-font-weight: normal;
|
||||||
|
-fx-text-fill: #a8f0a8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
-fx-fill: #70e070;
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
-fx-text-fill: #70e070;
|
||||||
|
}
|
||||||
@@ -1,11 +1,56 @@
|
|||||||
.text-header {
|
.button {
|
||||||
-fx-font-family: "Arial";
|
-fx-background-radius: 6;
|
||||||
-fx-font-size: 24px;
|
-fx-cursor: hand;
|
||||||
|
-fx-padding: 14 28;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box {
|
||||||
|
-fx-background-radius: 4;
|
||||||
|
-fx-cursor: hand;
|
||||||
|
-fx-padding: 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box .arrow-button {
|
||||||
|
-fx-padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box-popup .list-cell {
|
||||||
|
-fx-padding: 8 0 8 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
-fx-padding: 28;
|
||||||
|
-fx-spacing: 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
.credits-container {
|
||||||
|
-fx-alignment: CENTER;
|
||||||
|
-fx-padding: 28;
|
||||||
|
}
|
||||||
|
|
||||||
|
.current-player {
|
||||||
|
-fx-font-size: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
-fx-font-size: 28px;
|
||||||
-fx-font-weight: bold;
|
-fx-font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-normal {
|
.input {
|
||||||
-fx-font-family: "Arial";
|
-fx-background-radius: 4;
|
||||||
-fx-font-size: 20px;
|
-fx-padding: 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
.separator {
|
||||||
|
-fx-padding: 14 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider {
|
||||||
|
-fx-padding: 10 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
-fx-font-size: 22px;
|
||||||
-fx-font-weight: normal;
|
-fx-font-weight: normal;
|
||||||
}
|
}
|
||||||
@@ -1,215 +0,0 @@
|
|||||||
/* ----------------------------
|
|
||||||
.background
|
|
||||||
----------------------------- */
|
|
||||||
.bg-primary {
|
|
||||||
-fx-background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-secondary {
|
|
||||||
-fx-background-color: #f2f2f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-popup {
|
|
||||||
-fx-background-color: #ffffffcc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.button
|
|
||||||
----------------------------- */
|
|
||||||
.button {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 10 20;
|
|
||||||
-fx-background-radius: 6;
|
|
||||||
-fx-cursor: hand;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #f2f2f2;
|
|
||||||
-fx-text-fill: #000000;
|
|
||||||
-fx-border-color: #000000;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
|
|
||||||
/* Effects */
|
|
||||||
-fx-effect: dropshadow(gaussian, #00000033, 4, 0, 0, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.button:hover {
|
|
||||||
-fx-background-color: #e0e0e0;
|
|
||||||
-fx-border-color: #008000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.choice-box
|
|
||||||
----------------------------- */
|
|
||||||
.choice-box {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 6;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #ffffff;
|
|
||||||
-fx-border-color: #000000;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
-fx-mark-color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box:hover {
|
|
||||||
-fx-border-color: #008000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box:focused {
|
|
||||||
-fx-border-color: #009900;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .label {
|
|
||||||
-fx-text-fill: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.choice-box popup styling
|
|
||||||
----------------------------- */
|
|
||||||
.choice-box .context-menu {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 4;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #ffffff;
|
|
||||||
-fx-border-color: #000000;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .menu-item {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 6 12;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .menu-item .label {
|
|
||||||
-fx-text-fill: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .menu-item:hover {
|
|
||||||
-fx-background-color: #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.choice-box .menu-item:focused {
|
|
||||||
-fx-background-color: #008000;
|
|
||||||
-fx-text-fill: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.container
|
|
||||||
----------------------------- */
|
|
||||||
.container {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 10;
|
|
||||||
-fx-alignment: center;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #f9f9f9;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.input
|
|
||||||
----------------------------- */
|
|
||||||
.input {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 8;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #ffffff;
|
|
||||||
-fx-text-fill: #000000;
|
|
||||||
-fx-border-color: #000000;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input:hover {
|
|
||||||
-fx-border-color: #008000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input:focused {
|
|
||||||
-fx-border-color: #009900;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.separator
|
|
||||||
----------------------------- */
|
|
||||||
.separator {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 10 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.separator .line {
|
|
||||||
/* Color */
|
|
||||||
-fx-border-color: #000000;
|
|
||||||
-fx-border-width: 0 0 1 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.slider
|
|
||||||
----------------------------- */
|
|
||||||
.slider {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 6 0;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider .track {
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: linear-gradient(to left, #00cc00, #cc0000);
|
|
||||||
-fx-background-insets: 0;
|
|
||||||
-fx-background-radius: 2;
|
|
||||||
-fx-pref-height: 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider .thumb {
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #000000;
|
|
||||||
-fx-background-radius: 50%;
|
|
||||||
|
|
||||||
/* Effects */
|
|
||||||
-fx-effect: dropshadow(gaussian, #00000066, 4, 0, 0, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider .thumb:hover {
|
|
||||||
-fx-scale-x: 1.2;
|
|
||||||
-fx-scale-y: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.text-header
|
|
||||||
----------------------------- */
|
|
||||||
.text-header {
|
|
||||||
-fx-fill: #000000;
|
|
||||||
-fx-text-fill: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.text-normal
|
|
||||||
----------------------------- */
|
|
||||||
.text-normal {
|
|
||||||
-fx-fill: #111111;
|
|
||||||
-fx-text-fill: #111111;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.toggle-button
|
|
||||||
----------------------------- */
|
|
||||||
.toggle {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 8 16;
|
|
||||||
-fx-background-radius: 6;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #e6e6e6;
|
|
||||||
-fx-text-fill: #000000;
|
|
||||||
-fx-border-color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle:hover {
|
|
||||||
-fx-background-color: #00cc00;
|
|
||||||
-fx-text-fill: #ffffff;
|
|
||||||
-fx-border-color: #00cc00;
|
|
||||||
}
|
|
||||||
@@ -1,215 +1,139 @@
|
|||||||
/* ----------------------------
|
|
||||||
.background
|
|
||||||
----------------------------- */
|
|
||||||
.bg-primary {
|
.bg-primary {
|
||||||
-fx-background-color: #f5f5f5;
|
-fx-background-color: linear-gradient(to bottom, #f0f6f4, #dbe9e5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-secondary {
|
.bg-secondary {
|
||||||
-fx-background-color: #e0e0e0;
|
-fx-background-color: linear-gradient(to bottom, #d0e0db, #b7cdc6);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-popup {
|
.bg-popup {
|
||||||
-fx-background-color: #f5f5f57f;
|
-fx-background-color: rgba(240, 248, 250, 0.9);
|
||||||
|
-fx-background-radius: 8;
|
||||||
|
-fx-effect: dropshadow(gaussian, #a0c4b088, 6, 0, 0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.button
|
|
||||||
----------------------------- */
|
|
||||||
.button {
|
.button {
|
||||||
/* Layout */
|
-fx-background-color: linear-gradient(to bottom, #7ac27a, #90d090);
|
||||||
-fx-padding: 10 20;
|
-fx-background-radius: 8;
|
||||||
-fx-background-radius: 6;
|
-fx-border-color: #5caf5c;
|
||||||
-fx-cursor: hand;
|
-fx-cursor: hand;
|
||||||
|
-fx-effect: dropshadow(gaussian, #7abf7aaa, 5, 0, 0, 2);
|
||||||
/* Color */
|
-fx-text-fill: #2a3a2a;
|
||||||
-fx-background-color: #e0e0e0;
|
-fx-font-weight: bold;
|
||||||
-fx-text-fill: #1a1a1a;
|
|
||||||
-fx-border-color: #cccccc;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
|
|
||||||
/* Effects */
|
|
||||||
-fx-effect: dropshadow(gaussian, #00000026, 4, 0, 0, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:hover {
|
.button:hover {
|
||||||
-fx-background-color: #d5d5d5;
|
-fx-background-color: linear-gradient(to bottom, #a2d1a1, #b8e3b9);
|
||||||
-fx-border-color: #4caf50;
|
-fx-border-color: #4a784a;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
.combo-box {
|
||||||
.choice-box
|
-fx-background-color: linear-gradient(to bottom, #d9e6e1, #b8ccc5);
|
||||||
----------------------------- */
|
-fx-background-radius: 6;
|
||||||
.choice-box {
|
-fx-border-color: #5caf5c;
|
||||||
/* Layout */
|
-fx-cursor: hand;
|
||||||
-fx-padding: 6;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #e0e0e0;
|
|
||||||
-fx-border-color: #cccccc;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
-fx-mark-color: #1a1a1a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box:hover {
|
.combo-box:hover {
|
||||||
-fx-border-color: #4caf50;
|
-fx-border-color: #81b581;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box:focused {
|
.combo-box:focused {
|
||||||
-fx-border-color: #81c784;
|
-fx-border-color: #aad3aa;
|
||||||
|
-fx-effect: dropshadow(gaussian, #aad3aa99, 4, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .label {
|
.combo-box .arrow,
|
||||||
-fx-text-fill: #1a1a1a;
|
.combo-box .arrow-button {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-border-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
.combo-box .list-cell {
|
||||||
.choice-box popup styling
|
-fx-background-color: transparent;
|
||||||
----------------------------- */
|
-fx-text-fill: #588758;
|
||||||
.choice-box .context-menu {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 4;
|
|
||||||
-fx-background-radius: 4;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #ffffff;
|
|
||||||
-fx-border-color: #cccccc;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .menu-item {
|
.combo-box .list-view {
|
||||||
/* Layout */
|
-fx-background-color: #d3e4d7;
|
||||||
-fx-padding: 6 12;
|
-fx-background-radius: 6;
|
||||||
|
-fx-border-color: #5caf5c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .menu-item .label {
|
.combo-box-popup .list-cell {
|
||||||
-fx-text-fill: #333333;
|
-fx-text-fill: #588758;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .menu-item:hover {
|
.combo-box-popup .list-cell:hover {
|
||||||
-fx-background-color: #eeeeee;
|
-fx-background-color: #90d090;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-box .menu-item:focused {
|
.combo-box-popup .list-cell:selected {
|
||||||
-fx-background-color: #4caf50;
|
-fx-background-color: #7ac27a;
|
||||||
-fx-text-fill: #ffffff;
|
-fx-text-fill: #f0faf0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.container
|
|
||||||
----------------------------- */
|
|
||||||
.container {
|
.container {
|
||||||
/* Layout */
|
-fx-background-color: linear-gradient(to bottom, #e9f2ee, #cde3d9);
|
||||||
-fx-padding: 10;
|
-fx-background-radius: 6;
|
||||||
-fx-alignment: center;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #e0e0e0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.input
|
|
||||||
----------------------------- */
|
|
||||||
.input {
|
.input {
|
||||||
/* Layout */
|
-fx-background-color: linear-gradient(to bottom, #e6f0ec, #c8dbcd);
|
||||||
-fx-padding: 8;
|
-fx-background-radius: 6;
|
||||||
-fx-background-radius: 4;
|
-fx-border-color: #5caf5c;
|
||||||
|
-fx-text-fill: #588758;
|
||||||
/* Color */
|
-fx-font-weight: normal;
|
||||||
-fx-background-color: #ffffff;
|
|
||||||
-fx-text-fill: #1a1a1a;
|
|
||||||
-fx-border-color: #cccccc;
|
|
||||||
-fx-border-width: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input:hover {
|
.input:hover {
|
||||||
-fx-border-color: #4caf50;
|
-fx-border-color: #81b581;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input:focused {
|
.input:focused {
|
||||||
-fx-border-color: #81c784;
|
-fx-border-color: #aad3aa;
|
||||||
|
-fx-effect: dropshadow(gaussian, #aad3aa99, 4, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
.my-turn {
|
||||||
.separator
|
-fx-fill: #d14b4b;
|
||||||
----------------------------- */
|
-fx-font-weight: bold;
|
||||||
.separator {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 10 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.separator .line {
|
.separator .line {
|
||||||
/* Color */
|
-fx-border-color: #81b581;
|
||||||
-fx-border-color: #cccccc;
|
-fx-opacity: 1;
|
||||||
-fx-border-width: 0 0 1 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.slider
|
|
||||||
----------------------------- */
|
|
||||||
.slider {
|
.slider {
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 6 0;
|
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: transparent;
|
-fx-background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider .track {
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: linear-gradient(to left, #4caf50, #f44336);
|
|
||||||
-fx-background-insets: 0;
|
|
||||||
-fx-background-radius: 2;
|
|
||||||
-fx-pref-height: 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider .thumb {
|
.slider .thumb {
|
||||||
/* Color */
|
-fx-background-color: linear-gradient(to bottom, #7ac27a, #90d090);
|
||||||
-fx-background-color: #1a1a1a;
|
|
||||||
-fx-background-radius: 50%;
|
-fx-background-radius: 50%;
|
||||||
|
-fx-effect: dropshadow(gaussian, #7abf7faa, 5, 0, 0, 1);
|
||||||
/* Effects */
|
|
||||||
-fx-effect: dropshadow(gaussian, #00000033, 4, 0, 0, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider .thumb:hover {
|
.slider .thumb:hover {
|
||||||
-fx-scale-x: 1.2;
|
-fx-scale-x: 1.15;
|
||||||
-fx-scale-y: 1.2;
|
-fx-scale-y: 1.15;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------
|
.slider .track {
|
||||||
.text-header
|
-fx-background-color: linear-gradient(to left, #b8e3b9, #d05c5c);
|
||||||
----------------------------- */
|
-fx-background-insets: 0;
|
||||||
.text-header {
|
|
||||||
-fx-fill: #1a1a1a;
|
|
||||||
-fx-text-fill: #1a1a1a;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.text-normal
|
|
||||||
----------------------------- */
|
|
||||||
.text-normal {
|
|
||||||
-fx-fill: #333333;
|
|
||||||
-fx-text-fill: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------
|
|
||||||
.toggle-button
|
|
||||||
----------------------------- */
|
|
||||||
.toggle {
|
|
||||||
/* Layout */
|
|
||||||
-fx-padding: 8 16;
|
|
||||||
-fx-background-radius: 6;
|
-fx-background-radius: 6;
|
||||||
|
|
||||||
/* Color */
|
|
||||||
-fx-background-color: #d0d0d0;
|
|
||||||
-fx-text-fill: #1a1a1a;
|
|
||||||
-fx-border-color: #b0b0b0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle:hover {
|
.text {
|
||||||
-fx-background-color: #4caf50;
|
-fx-fill: #588758;
|
||||||
-fx-text-fill: #ffffff;
|
-fx-font-weight: normal;
|
||||||
-fx-border-color: #4caf50;
|
-fx-text-fill: #588758;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
-fx-fill: #aad3aa;
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
-fx-text-fill: #aad3aa;
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,56 @@
|
|||||||
.text-header {
|
.button {
|
||||||
-fx-font-family: "Arial";
|
-fx-background-radius: 6;
|
||||||
|
-fx-cursor: hand;
|
||||||
|
-fx-padding: 10 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box {
|
||||||
|
-fx-background-radius: 4;
|
||||||
|
-fx-cursor: hand;
|
||||||
|
-fx-padding: 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box .arrow-button {
|
||||||
|
-fx-padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box-popup .list-cell {
|
||||||
|
-fx-padding: 5 0 5 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
-fx-padding: 20;
|
||||||
|
-fx-spacing: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.credits-container {
|
||||||
|
-fx-alignment: CENTER;
|
||||||
|
-fx-padding: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.current-player {
|
||||||
|
-fx-font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
-fx-font-size: 20px;
|
-fx-font-size: 20px;
|
||||||
-fx-font-weight: bold;
|
-fx-font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-normal {
|
.input {
|
||||||
-fx-font-family: "Arial";
|
-fx-background-radius: 4;
|
||||||
|
-fx-padding: 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.separator {
|
||||||
|
-fx-padding: 10 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider {
|
||||||
|
-fx-padding: 6 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
-fx-font-size: 16px;
|
-fx-font-size: 16px;
|
||||||
-fx-font-weight: normal;
|
-fx-font-weight: normal;
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,56 @@
|
|||||||
.text-header {
|
.button {
|
||||||
-fx-font-family: "Arial";
|
-fx-background-radius: 6;
|
||||||
|
-fx-cursor: hand;
|
||||||
|
-fx-padding: 6 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box {
|
||||||
|
-fx-background-radius: 4;
|
||||||
|
-fx-cursor: hand;
|
||||||
|
-fx-padding: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box .arrow-button {
|
||||||
|
-fx-padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.combo-box-popup .list-cell {
|
||||||
|
-fx-padding: 3 0 3 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
-fx-padding: 12;
|
||||||
|
-fx-spacing: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.credits-container {
|
||||||
|
-fx-alignment: CENTER;
|
||||||
|
-fx-padding: 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
.current-player {
|
||||||
-fx-font-size: 16px;
|
-fx-font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
-fx-font-size: 14px;
|
||||||
-fx-font-weight: bold;
|
-fx-font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-normal {
|
.input {
|
||||||
-fx-font-family: "Arial";
|
-fx-background-radius: 4;
|
||||||
|
-fx-padding: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.separator {
|
||||||
|
-fx-padding: 6 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider {
|
||||||
|
-fx-padding: 4 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
-fx-font-size: 12px;
|
-fx-font-size: 12px;
|
||||||
-fx-font-weight: normal;
|
-fx-font-weight: normal;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user