Commit de69ba12 authored by Peining's avatar Peining
Browse files

Merge branch 'ihm-main/develop' of https://gitlab.utc.fr/qdruault/lo23-project...

Merge branch 'ihm-main/develop' of https://gitlab.utc.fr/qdruault/lo23-project into ihm-main/develop
parents 55ba0041 aaa4e365
...@@ -95,6 +95,7 @@ public class IHMMain { ...@@ -95,6 +95,7 @@ public class IHMMain {
} }
public void toMenu() throws IOException{ public void toMenu() throws IOException{
primaryStage.setTitle("Battle Ship");
toScene(SceneName.MENU); toScene(SceneName.MENU);
} }
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
*/ */
package com.utclo23.ihmmain.controller; package com.utclo23.ihmmain.controller;
import com.utclo23.data.module.DataException; import com.utclo23.data.module.DataException;
import com.utclo23.data.structure.Game;
import com.utclo23.data.structure.GameType; import com.utclo23.data.structure.GameType;
import java.io.IOException; import java.io.IOException;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
...@@ -16,7 +15,6 @@ import javafx.scene.control.RadioButton; ...@@ -16,7 +15,6 @@ import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.scene.control.ToggleGroup; import javafx.scene.control.ToggleGroup;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javax.swing.JOptionPane;
/** /**
* Controll of the createGame page. * Controll of the createGame page.
...@@ -26,40 +24,31 @@ import javax.swing.JOptionPane; ...@@ -26,40 +24,31 @@ import javax.swing.JOptionPane;
public class CreateGameController extends AbstractController{ public class CreateGameController extends AbstractController{
ToggleGroup mode; ToggleGroup mode;
ToggleGroup enemy; ToggleGroup enemy;
@FXML @FXML
RadioButton radioButtonClassical; RadioButton radioButtonClassical;
@FXML @FXML
RadioButton radioButtonBelge; RadioButton radioButtonBelge;
@FXML @FXML
RadioButton radioButtonComputer; RadioButton radioButtonComputer;
@FXML @FXML
RadioButton radioButtonPlayer; RadioButton radioButtonPlayer;
@FXML @FXML
CheckBox radioButtonAudience; CheckBox radioButtonAudience;
@FXML @FXML
CheckBox radioButtonChat; CheckBox radioButtonChat;
@FXML @FXML
TextField gameNameField; TextField gameNameField;
@FXML
private ImageView avatarImageView;
@FXML
private Label playerUsernameLabel;
@FXML @FXML
private ImageView avatarImageView;
@FXML
private Label playerUsernameLabel;
/** /**
* This function is called at the oppening of the page. * This function is called at the oppening of the page.
* It affects default values to Mode and Enemy and create the toggle groups * It affects default values to Mode and Enemy and create the toggle groups
*/ */
@FXML
public void initialize(){ public void initialize(){
// Toggle Group // Toggle Group
mode = new ToggleGroup(); mode = new ToggleGroup();
...@@ -104,15 +93,13 @@ public class CreateGameController extends AbstractController{ ...@@ -104,15 +93,13 @@ public class CreateGameController extends AbstractController{
private void validateCreateGame(ActionEvent event){ private void validateCreateGame(ActionEvent event){
String names = gameNameField.getText(); String names = gameNameField.getText();
gameNameField.setStyle(""); gameNameField.setStyle("");
JOptionPane msg = new JOptionPane();
if (!names.isEmpty()){ if (!names.isEmpty()){
GameType modes = (((RadioButton) mode.getSelectedToggle()).getText()).equals("CLASSIC") ? GameType.CLASSIC : GameType.BELGIAN; GameType modes = (((RadioButton) mode.getSelectedToggle()).getText()).equals("CLASSIC") ? GameType.CLASSIC : GameType.BELGIAN;
boolean enemys = (((RadioButton) enemy.getSelectedToggle()).getText()).equals("Computer"); boolean enemys = (((RadioButton) enemy.getSelectedToggle()).getText()).equals("Computer");
boolean chats = radioButtonChat.isSelected(); boolean chats = radioButtonChat.isSelected();
boolean audiences = radioButtonAudience.isSelected(); boolean audiences = radioButtonAudience.isSelected();
try{ try{
Game newGame = getFacade().iDataIHMMain.createGame(names, enemys, audiences, chats, modes); getFacade().iDataIHMMain.createGame(names, enemys, audiences, chats, modes);
//msg.showMessageDialog(null, "Game created", "Information", JOptionPane.INFORMATION_MESSAGE);
getFacade().iIHMTableToIHMMain.createInGameGUI(getIhmmain().primaryStage); getFacade().iIHMTableToIHMMain.createInGameGUI(getIhmmain().primaryStage);
}catch (DataException e){ }catch (DataException e){
......
...@@ -11,49 +11,9 @@ ...@@ -11,49 +11,9 @@
<?import javafx.scene.layout.GridPane?> <?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.shape.Line?> <?import javafx.scene.shape.Line?>
<?import javafx.scene.control.*?>
<!--
<columnConstraints>
<ColumnConstraints percentWidth="35.0" hgrow="SOMETIMES" />
<ColumnConstraints percentWidth="35.0" hgrow="SOMETIMES" />
<ColumnConstraints percentWidth="35.0" hgrow="SOMETIMES" />
<ColumnConstraints percentWidth="35.0" hgrow="SOMETIMES" />
<ColumnConstraints percentWidth="35.0" hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="35.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="5.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="5.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="5.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="5.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="5.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label id="pageTitleLabel" GridPane.columnIndex="2" GridPane.rowIndex="1" text="Create a game" textAlignment="CENTER" />
<Label id="formLabel" alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="2" text="Name" />
<TextField fx:id="gameNameField" GridPane.columnIndex="2" GridPane.rowIndex="2" prefHeight="25.0" prefWidth="166.0" />
<Label id="formLabel" alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="3" text="Mode" />
<RadioButton fx:id="radioButtonClassical" alignment="CENTER_RIGHT" GridPane.columnIndex="2" GridPane.rowIndex="3" mnemonicParsing="false" text="CLASSIC" />
<RadioButton fx:id="radioButtonBelge" alignment="CENTER_RIGHT" GridPane.columnIndex="3" GridPane.rowIndex="3" mnemonicParsing="false" text="BELGIAN" />
<Label id="formLabel" alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="4" text="Enemy" />
<RadioButton fx:id="radioButtonComputer" alignment="CENTER_RIGHT" GridPane.columnIndex="2" GridPane.rowIndex="4" mnemonicParsing="false" text="Computer" />
<RadioButton fx:id="radioButtonPlayer" alignment="CENTER_RIGHT" GridPane.columnIndex="3" GridPane.rowIndex="4" mnemonicParsing="false" text="Player" />
<CheckBox fx:id="radioButtonAudience" GridPane.columnIndex="2" GridPane.rowIndex="5" mnemonicParsing="false" text="Audience" />
<CheckBox fx:id="radioButtonChat" GridPane.columnIndex="3" GridPane.rowIndex="5" mnemonicParsing="false" text="Chat" />
<Button GridPane.columnIndex="2" GridPane.rowIndex="6" mnemonicParsing="false" onAction="#validateCreateGame" text="Create" />
<Button GridPane.columnIndex="3" GridPane.rowIndex="6" mnemonicParsing="false" onAction="#back" text="Return" />
</children>
-->
<GridPane id="generalGrid" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="600" minWidth="800" prefHeight="768" prefWidth="1368" stylesheets="@../../styles/ihmmain.css" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.utclo23.ihmmain.controller.CreateGameController"> <GridPane id="generalGrid" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="600" minWidth="800" prefHeight="768" prefWidth="1368" stylesheets="@../../styles/ihmmain.css" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.utclo23.ihmmain.controller.CreateGameController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" /> <ColumnConstraints hgrow="SOMETIMES" />
</columnConstraints> </columnConstraints>
...@@ -65,22 +25,21 @@ ...@@ -65,22 +25,21 @@
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT"> <GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" /> <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" /> <ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children> </children>
</GridPane> </GridPane>
<Label id="pageTitleLabel" text="Create a game" textAlignment="CENTER" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER" /> <Label id="pageTitleLabel" text="Create a game" textAlignment="CENTER" 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" /> <Line fx:id="lineDesign" endX="100.0" startX="-100.0" styleClass="lineDesign" GridPane.halignment="CENTER" GridPane.valignment="BOTTOM" />
<GridPane GridPane.rowIndex="2"> <GridPane GridPane.rowIndex="2">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="30.0" /> <ColumnConstraints hgrow="SOMETIMES" percentWidth="30.0" />
...@@ -91,28 +50,21 @@ ...@@ -91,28 +50,21 @@
<RowConstraints percentHeight="100.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<!-- DEBUT CORPS --> <!-- DEBUT CORPS -->
<GridPane id="frameButton" GridPane.columnIndex="1"> <GridPane id="frameButton" GridPane.columnIndex="1">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" /> <ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="80.0" /> <ColumnConstraints hgrow="SOMETIMES" percentWidth="80.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" /> <ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints percentHeight="25.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="25.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="25.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="25.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="25.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="25.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="25.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="25.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="0"> <GridPane GridPane.columnIndex="1" GridPane.rowIndex="0">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="33.0" /> <ColumnConstraints hgrow="SOMETIMES" percentWidth="33.0" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="67.0" /> <ColumnConstraints hgrow="SOMETIMES" percentWidth="67.0" />
...@@ -122,7 +74,11 @@ ...@@ -122,7 +74,11 @@
</rowConstraints> </rowConstraints>
<children> <children>
<Label id="formLabel" alignment="CENTER_RIGHT" text="Name" GridPane.columnIndex="0" GridPane.rowIndex="0" /> <Label id="formLabel" alignment="CENTER_RIGHT" text="Name" GridPane.columnIndex="0" GridPane.rowIndex="0" />
<TextField fx:id="gameNameField" prefHeight="25.0" prefWidth="166.0" GridPane.columnIndex="1" GridPane.rowIndex="0" /> <TextField fx:id="gameNameField" prefHeight="25.0" prefWidth="166.0" GridPane.columnIndex="1" GridPane.rowIndex="0" >
<tooltip>
<Tooltip text="Enter game's name."/>
</tooltip>
</TextField>
</children> </children>
</GridPane> </GridPane>
...@@ -137,8 +93,16 @@ ...@@ -137,8 +93,16 @@
</rowConstraints> </rowConstraints>
<children> <children>
<Label id="formLabel" alignment="CENTER_RIGHT" text="Mode" GridPane.columnIndex="0" GridPane.rowIndex="0" /> <Label id="formLabel" alignment="CENTER_RIGHT" text="Mode" GridPane.columnIndex="0" GridPane.rowIndex="0" />
<RadioButton fx:id="radioButtonClassical" alignment="CENTER_RIGHT" mnemonicParsing="false" text="CLASSIC" GridPane.columnIndex="1" GridPane.rowIndex="0" /> <RadioButton fx:id="radioButtonClassical" alignment="CENTER_RIGHT" mnemonicParsing="false" text="CLASSIC" GridPane.columnIndex="1" GridPane.rowIndex="0">
<RadioButton fx:id="radioButtonBelge" alignment="CENTER_RIGHT" mnemonicParsing="false" text="BELGIAN" GridPane.columnIndex="2" GridPane.rowIndex="0" /> <tooltip>
<Tooltip text="Select if you want to play a classic game."/>
</tooltip>
</RadioButton>
<RadioButton fx:id="radioButtonBelge" GridPane.halignment="RIGHT" mnemonicParsing="false" text="BELGIAN" GridPane.columnIndex="2" GridPane.rowIndex="0" >
<tooltip>
<Tooltip text="Select if you want to play a Belgian game."/>
</tooltip>
</RadioButton>
</children> </children>
</GridPane> </GridPane>
...@@ -153,8 +117,16 @@ ...@@ -153,8 +117,16 @@
</rowConstraints> </rowConstraints>
<children> <children>
<Label id="formLabel" alignment="CENTER_RIGHT" text="Enemy" GridPane.columnIndex="0" GridPane.rowIndex="0" /> <Label id="formLabel" alignment="CENTER_RIGHT" text="Enemy" GridPane.columnIndex="0" GridPane.rowIndex="0" />
<RadioButton fx:id="radioButtonComputer" alignment="CENTER_RIGHT" mnemonicParsing="false" text="Computer" GridPane.columnIndex="1" GridPane.rowIndex="0" /> <RadioButton fx:id="radioButtonComputer" alignment="CENTER_RIGHT" mnemonicParsing="false" text="Computer" GridPane.columnIndex="1" GridPane.rowIndex="0" >
<RadioButton fx:id="radioButtonPlayer" alignment="CENTER_RIGHT" mnemonicParsing="false" text="Player" GridPane.columnIndex="2" GridPane.rowIndex="0" /> <tooltip>
<Tooltip text="Select if you want to play against the computer."/>
</tooltip>
</RadioButton>
<RadioButton fx:id="radioButtonPlayer" GridPane.halignment="RIGHT" mnemonicParsing="false" text="Player" GridPane.columnIndex="2" GridPane.rowIndex="0" >
<tooltip>
<Tooltip text="Select if you want to play against an other player."/>
</tooltip>
</RadioButton>
</children> </children>
</GridPane> </GridPane>
...@@ -167,8 +139,16 @@ ...@@ -167,8 +139,16 @@
<RowConstraints percentHeight="100.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<CheckBox fx:id="radioButtonAudience" GridPane.columnIndex="0" GridPane.rowIndex="0" mnemonicParsing="false" text="Audience" GridPane.halignment="CENTER" GridPane.valignment="CENTER" /> <CheckBox fx:id="radioButtonAudience" GridPane.columnIndex="0" GridPane.rowIndex="0" mnemonicParsing="false" text="Audience" GridPane.halignment="CENTER" GridPane.valignment="CENTER" >
<CheckBox fx:id="radioButtonChat" GridPane.columnIndex="1" GridPane.rowIndex="0" mnemonicParsing="false" text="Chat" GridPane.halignment="CENTER" GridPane.valignment="CENTER"/> <tooltip>
<Tooltip text="Check to allow viewers."/>
</tooltip>
</CheckBox>
<CheckBox fx:id="radioButtonChat" GridPane.columnIndex="1" GridPane.rowIndex="0" mnemonicParsing="false" text="Chat" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<tooltip>
<Tooltip text="Check to activate chat."/>
</tooltip>
</CheckBox>
</children> </children>
</GridPane> </GridPane>
</children> </children>
...@@ -188,15 +168,23 @@ ...@@ -188,15 +168,23 @@
<RowConstraints percentHeight="100.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Button GridPane.columnIndex="1" maxWidth="Infinity" GridPane.rowIndex="0" onAction="#validateCreateGame" text="Create" GridPane.halignment="CENTER" GridPane.valignment="CENTER"/> <Button GridPane.columnIndex="1" maxWidth="Infinity" GridPane.rowIndex="0" onAction="#validateCreateGame" text="Create" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<Button GridPane.columnIndex="3" maxWidth="Infinity" GridPane.rowIndex="0" onAction="#back" text="Return" GridPane.halignment="CENTER" GridPane.valignment="CENTER"/> <tooltip>
<Tooltip text="Click to create the game."/>
</tooltip>
</Button>
<Button GridPane.columnIndex="3" maxWidth="Infinity" GridPane.rowIndex="0" onAction="#back" text="RETURN" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<tooltip>
<Tooltip text="Click to go back to the menu."/>
</tooltip>
</Button>
</children> </children>
</GridPane> </GridPane>
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER"> <ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin> <GridPane.margin>
<Insets right="20.0" top="20.0" /> <Insets right="20.0" top="20.0" />
</GridPane.margin> </GridPane.margin>
</ImageView> </ImageView>
</children> </children>
</GridPane> </GridPane>
...@@ -54,14 +54,14 @@ ...@@ -54,14 +54,14 @@
<Tooltip text="Your username is visible by the other players" /> <Tooltip text="Your username is visible by the other players" />
</tooltip> </tooltip>
</TextField> </TextField>
<PasswordField fx:id="passwordField" GridPane.columnIndex="1" GridPane.rowIndex="1"> <PasswordField fx:id="passwordField" GridPane.columnIndex="1" GridPane.rowIndex="1">
<GridPane.margin> <GridPane.margin>
<Insets left="20.0" right="20.0" /> <Insets left="20.0" right="20.0" />
</GridPane.margin> </GridPane.margin>
<tooltip> <tooltip>
<Tooltip text="Your password" /> <Tooltip text="Your password" />
</tooltip> </tooltip>
</PasswordField> </PasswordField>
<TextField fx:id="firstNameField" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER"> <TextField fx:id="firstNameField" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<GridPane.margin> <GridPane.margin>
<Insets left="20.0" right="20.0" /> <Insets left="20.0" right="20.0" />
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<?import javafx.scene.layout.ColumnConstraints?> <?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?> <?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<?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.GameListController"> <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.GameListController">
<columnConstraints> <columnConstraints>
...@@ -20,7 +21,8 @@ ...@@ -20,7 +21,8 @@
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Label text="Games" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER" /> <Label id="pageTitleLabel" text="Games" 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" />
<ScrollPane id="gameListPane" fx:id="gameListPane" fitToHeight="true" fitToWidth="true" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" /> <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"> <GridPane id="ManageGrid" GridPane.rowIndex="2">
<columnConstraints> <columnConstraints>
...@@ -60,23 +62,23 @@ ...@@ -60,23 +62,23 @@
</Button> </Button>
</children> </children>
</GridPane> </GridPane>
<ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER"> <ImageView fx:id="avatarImageView" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin> <GridPane.margin>
<Insets right="20.0" top="20.0" /> <Insets right="20.0" top="20.0" />
</GridPane.margin> </GridPane.margin>
</ImageView> </ImageView>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT"> <GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" /> <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" /> <ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children> </children>
</GridPane> </GridPane>
</children> </children>
</GridPane> </GridPane>
<
...@@ -13,64 +13,80 @@ ...@@ -13,64 +13,80 @@
<?import javafx.scene.shape.Line?> <?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"> <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>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="70.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="70.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints percentHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT"> <GridPane maxWidth="300.0" minWidth="60.0" prefWidth="60.0" GridPane.halignment="RIGHT">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Label id="usernameLabel" fx:id="playerUsernameLabel" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="CENTER" /> <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" /> <ImageView fx:id="avatarImageView1" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
</children> </children>
</GridPane> </GridPane>
<Label id="pageTitleLabel" text="LIST OF IP" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="CENTER" /> <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" /> <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" /> <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." /> <GridPane id="ManageGrid" GridPane.rowIndex="3">
</tooltip> <columnConstraints>
</Button> <ColumnConstraints hgrow="SOMETIMES" percentWidth="35" />
<GridPane GridPane.rowIndex="2"> <ColumnConstraints hgrow="SOMETIMES" percentWidth="30" />
<columnConstraints> <ColumnConstraints hgrow="SOMETIMES" percentWidth="35" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" /> </columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="40.0" /> <rowConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="40.0" /> <RowConstraints percentHeight="100.0" vgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" percentWidth="10.0" /> </rowConstraints>
</columnConstraints> <children>
<rowConstraints> <Button fx:id="validateButton" maxWidth="Infinity" mnemonicParsing="false" onAction="#validateList" text="VALIDATE AND RETURN" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <tooltip>