Commit c36616fa authored by Peining Li's avatar Peining Li

Merge branch 'ihm-main/develop' into 'develop'

Ihm main/develop

See merge request !174
parents 0d8193fc 89c07dc9
......@@ -95,6 +95,7 @@ public class IHMMain {
}
public void toMenu() throws IOException{
primaryStage.setTitle("Battle Ship");
toScene(SceneName.MENU);
}
......
......@@ -5,7 +5,6 @@
*/
package com.utclo23.ihmmain.controller;
import com.utclo23.data.module.DataException;
import com.utclo23.data.structure.Game;
import com.utclo23.data.structure.GameType;
import java.io.IOException;
import javafx.event.ActionEvent;
......@@ -16,7 +15,6 @@ import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField;
import javafx.scene.control.ToggleGroup;
import javafx.scene.image.ImageView;
import javax.swing.JOptionPane;
/**
* Controll of the createGame page.
......@@ -26,40 +24,31 @@ import javax.swing.JOptionPane;
public class CreateGameController extends AbstractController{
ToggleGroup mode;
ToggleGroup enemy;
@FXML
RadioButton radioButtonClassical;
@FXML
RadioButton radioButtonBelge;
@FXML
RadioButton radioButtonComputer;
@FXML
RadioButton radioButtonPlayer;
@FXML
CheckBox radioButtonAudience;
@FXML
CheckBox radioButtonChat;
@FXML
TextField gameNameField;
@FXML
private ImageView avatarImageView;
@FXML
private Label playerUsernameLabel;
@FXML
private ImageView avatarImageView;
@FXML
private Label playerUsernameLabel;
/**
* This function is called at the oppening of the page.
* It affects default values to Mode and Enemy and create the toggle groups
*/
@FXML
public void initialize(){
// Toggle Group
mode = new ToggleGroup();
......@@ -104,15 +93,13 @@ public class CreateGameController extends AbstractController{
private void validateCreateGame(ActionEvent event){
String names = gameNameField.getText();
gameNameField.setStyle("");
JOptionPane msg = new JOptionPane();
if (!names.isEmpty()){
GameType modes = (((RadioButton) mode.getSelectedToggle()).getText()).equals("CLASSIC") ? GameType.CLASSIC : GameType.BELGIAN;
boolean enemys = (((RadioButton) enemy.getSelectedToggle()).getText()).equals("Computer");
boolean chats = radioButtonChat.isSelected();
boolean audiences = radioButtonAudience.isSelected();
try{
Game newGame = getFacade().iDataIHMMain.createGame(names, enemys, audiences, chats, modes);
//msg.showMessageDialog(null, "Game created", "Information", JOptionPane.INFORMATION_MESSAGE);
getFacade().iDataIHMMain.createGame(names, enemys, audiences, chats, modes);
getFacade().iIHMTableToIHMMain.createInGameGUI(getIhmmain().primaryStage);
}catch (DataException e){
......
......@@ -54,14 +54,14 @@
<Tooltip text="Your username is visible by the other players" />
</tooltip>
</TextField>
<PasswordField fx:id="passwordField" GridPane.columnIndex="1" GridPane.rowIndex="1">
<GridPane.margin>
<Insets left="20.0" right="20.0" />
</GridPane.margin>
<tooltip>
<Tooltip text="Your password" />
</tooltip>
</PasswordField>
<PasswordField fx:id="passwordField" GridPane.columnIndex="1" GridPane.rowIndex="1">
<GridPane.margin>
<Insets left="20.0" right="20.0" />
</GridPane.margin>
<tooltip>
<Tooltip text="Your password" />
</tooltip>
</PasswordField>
<TextField fx:id="firstNameField" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets left="20.0" right="20.0" />
......
......@@ -60,23 +60,23 @@
</Button>
</children>
</GridPane>
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="20.0" top="20.0" />
</GridPane.margin>
</ImageView>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="20.0" top="20.0" />
</GridPane.margin>
</ImageView>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
</children>
</GridPane>
......@@ -13,64 +13,80 @@
<?import javafx.scene.shape.Line?>
<GridPane id="generalGrid" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" stylesheets="@../../styles/ihmmain.css" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.utclo23.ihmmain.controller.IpListController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="70.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<Label id="pageTitleLabel" text="LIST OF IP" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER" />
<Line fx:id="lineDesign" endX="100.0" startX="-100.0" styleClass="lineDesign" GridPane.halignment="CENTER" GridPane.valignment="BOTTOM" />
<TableView fx:id="ipList" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
<Button fx:id="validateButton" mnemonicParsing="false" onAction="#validateList" text="VALIDATE AND RETURN" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER">
<tooltip>
<Tooltip text="Click to validate the changes and go back to the menu." />
</tooltip>
</Button>
<GridPane GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="40.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="40.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<TextField fx:id="ipAddressField" GridPane.columnIndex="1">
<tooltip>
<Tooltip text="Enter the IP address you want to add." />
</tooltip>
</TextField>
<Button fx:id="addRemoveButton" mnemonicParsing="false" onAction="#addIpAddress" prefHeight="25.0" text="ADD" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<tooltip>
<Tooltip text="Click to add the IP address." />
</tooltip>
</Button>
</children>
</GridPane>
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="20.0" top="20.0" />
</GridPane.margin>
</ImageView>
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="70.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<Label id="pageTitleLabel" text="LIST OF IP" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER" />
<Line fx:id="lineDesign" endX="100.0" startX="-100.0" styleClass="lineDesign" GridPane.halignment="CENTER" GridPane.valignment="BOTTOM" />
<TableView fx:id="ipList" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
<!-- -->
<GridPane id="ManageGrid" GridPane.rowIndex="3">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="35" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="30" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="35" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button fx:id="validateButton" maxWidth="Infinity" mnemonicParsing="false" onAction="#validateList" text="VALIDATE AND RETURN" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<tooltip>
<Tooltip text="Click to validate the changes and go back to the menu." />
</tooltip>
</Button>
</children>
</GridPane>
<!-- -->
<GridPane GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="40.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="40.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<TextField fx:id="ipAddressField" GridPane.columnIndex="1">
<tooltip>
<Tooltip text="Enter the IP address you want to add." />
</tooltip>
</TextField>
<Button fx:id="addRemoveButton" mnemonicParsing="false" onAction="#addIpAddress" prefHeight="25.0" text="ADD" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<tooltip>
<Tooltip text="Click to add the IP address." />
</tooltip>
</Button>
</children>
</GridPane>
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="20.0" top="20.0" />
</GridPane.margin>
</ImageView>
</children>
</GridPane>
......@@ -43,12 +43,12 @@
<Tooltip text="Click to create a new local player account."/>
</tooltip>
</Button>
<Button fx:id="exitButton" onAction="#exitAction" text="Exit" GridPane.columnIndex="1" GridPane.rowIndex="6" GridPane.halignment="CENTER" maxWidth="Infinity">
<Button fx:id="exitButton" onAction="#exitAction" text="Exit" GridPane.columnIndex="2" GridPane.rowIndex="6" GridPane.halignment="CENTER" maxWidth="Infinity">
<tooltip>
<Tooltip text="Click to exit the application."/>
</tooltip>
</Button>
<Button fx:id="loginButton" defaultButton="true" onAction="#loginAction" text="Login" GridPane.columnIndex="2" GridPane.rowIndex="6" GridPane.halignment="CENTER" maxWidth="Infinity">
<Button fx:id="loginButton" defaultButton="true" onAction="#loginAction" text="Login" GridPane.columnIndex="1" GridPane.rowIndex="6" GridPane.halignment="CENTER" maxWidth="Infinity">
<tooltip>
<Tooltip text="Click to login once your username and password have been completed."/>
</tooltip>
......
......@@ -87,18 +87,18 @@
</GridPane>
</children>
</GridPane>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
</children>
</GridPane>
......@@ -13,7 +13,6 @@
<GridPane id="generalGrid" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="600" minWidth="800" prefHeight="768" prefWidth="1368" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.utclo23.ihmmain.controller.NetworkInterfaceChoiceController" stylesheets="@../../styles/ihmmain.css">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES"/>
</columnConstraints>
......@@ -37,18 +36,9 @@
<RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<!-- DEBUT CORPS -->
<ListView fx:id="listNetworks" GridPane.halignment="CENTER" GridPane.columnIndex="1" GridPane.valignment="CENTER" />
<ListView fx:id="listNetworks" GridPane.halignment="CENTER" GridPane.columnIndex="1" GridPane.valignment="CENTER" />
</children>
</GridPane>
<GridPane GridPane.rowIndex = "4">
<columnConstraints>
<ColumnConstraints percentWidth="30.0" hgrow="SOMETIMES"/>
......
......@@ -12,53 +12,52 @@
<?import javafx.scene.shape.Line?>
<GridPane id="generalGrid" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" stylesheets="@../../styles/ihmmain.css" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.utclo23.ihmmain.controller.PlayerListController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<Label id="pageTitleLabel" text="PLAYERS" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER" />
<GridPane id="ManageGrid" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="33.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="34.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="33.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button fx:id="returnButton" mnemonicParsing="false" onAction="#returnMenu" text="RETURN" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER">
<tooltip>
<Tooltip text="Click to go back to the menu." />
</tooltip>
</Button>
</children>
</GridPane>
<TableView fx:id="listPlayers" onMouseClicked="#clickItem" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
</TableView>
<Line fx:id="lineDesign" endX="100.0" startX="-100.0" styleClass="lineDesign" GridPane.halignment="CENTER" GridPane.valignment="BOTTOM" />
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="20.0" top="20.0" />
</GridPane.margin>
</ImageView>
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<Label id="pageTitleLabel" text="PLAYERS" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER" />
<GridPane id="ManageGrid" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="42.5" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="15.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="42.5" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button fx:id="returnButton" mnemonicParsing="false" maxWidth="Infinity" onAction="#returnMenu" text="RETURN" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER">
<tooltip>
<Tooltip text="Click to go back to the menu." />
</tooltip>
</Button>
</children>
</GridPane>
<TableView fx:id="listPlayers" onMouseClicked="#clickItem" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
<Line fx:id="lineDesign" endX="100.0" startX="-100.0" styleClass="lineDesign" GridPane.halignment="CENTER" GridPane.valignment="BOTTOM" />
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="20.0" top="20.0" />
</GridPane.margin>
</ImageView>
</children>
</GridPane>
......@@ -10,48 +10,50 @@
<?import javafx.scene.layout.RowConstraints?>
<GridPane id="generalGrid" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" stylesheets="@../../styles/ihmmain.css" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.utclo23.ihmmain.controller.SavedGameListController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<Label text="Replays" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER" />
<ScrollPane id="gameListPane" fx:id="gameListPane" fitToHeight="true" fitToWidth="true" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
<GridPane id="ManageGrid" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="34.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="33.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="33.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button fx:id="returnButton" mnemonicParsing="false" onAction="#returnMenu" text="RETURN" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<Button fx:id="watchButton" mnemonicParsing="false" onAction="#watchSelectedGame" text="Watch" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="20.0" top="20.0" />
</GridPane.margin>
</ImageView>
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" />
<ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<Label text="Replays" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER" />
<ScrollPane id="gameListPane" fx:id="gameListPane" fitToHeight="true" fitToWidth="true" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
<GridPane id="ManageGrid" GridPane.rowIndex="2">
<columnConstraints>
<ColumnConstraints percentWidth="30.0" hgrow="SOMETIMES"/>
<ColumnConstraints percentWidth="15.0" hgrow="SOMETIMES"/>
<ColumnConstraints percentWidth="10.0" hgrow="SOMETIMES"/>
<ColumnConstraints percentWidth="15.0" hgrow="SOMETIMES"/>
<ColumnConstraints percentWidth="30.0" hgrow="SOMETIMES"/>
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button GridPane.columnIndex="3" maxWidth="Infinity" fx:id="returnButton" mnemonicParsing="false" onAction="#returnMenu" text="RETURN" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<Button GridPane.columnIndex="1" maxWidth="Infinity" fx:id="watchButton" mnemonicParsing="false" onAction="#watchSelectedGame" text="Watch" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children>
</GridPane>
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="20.0" top="20.0" />
</GridPane.margin>
</ImageView>
</children>
</GridPane>
......@@ -8,23 +8,23 @@
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="150.0" prefWidth="300.0" stylesheets="@../../styles/ihmmain.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.utclo23.ihmmain.controller.PopupController">
<children>
<Pane prefHeight="151.0" prefWidth="400.0" style="-fx-background-color: #061f30;">
<children>
<GridPane layoutX="51.0" layoutY="50.0" prefHeight="54.0" prefWidth="277.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="135.0" minWidth="10.0" prefWidth="105.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="202.0" minWidth="10.0" prefWidth="173.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="40.0" minHeight="10.0" prefHeight="28.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="27.0" minHeight="10.0" prefHeight="26.0" vgrow="SOMETIMES" />
</rowConstraints>
</GridPane>
<Button layoutX="46.0" layoutY="91.0" mnemonicParsing="false" onAction="#close" prefHeight="27.0" prefWidth="97.0" text="Back" />
<Button fx:id="submit" layoutX="231.0" layoutY="91.0" mnemonicParsing="false" onAction="#update" prefHeight="27.0" prefWidth="97.0" text="Submit" />
<TextArea fx:id="field" layoutX="77.0" layoutY="35.0" prefHeight="28.0" prefWidth="229.0" />
</children>
</Pane>
</children>
<children>
<Pane prefHeight="151.0" prefWidth="400.0" style="-fx-background-color: #061f30;">
<children>
<GridPane layoutX="51.0" layoutY="50.0" prefHeight="54.0" prefWidth="277.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="135.0" minWidth="10.0" prefWidth="105.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="202.0" minWidth="10.0" prefWidth="173.0" />