Commit c0549a6d authored by remid0's avatar remid0

Merge branch 'master' into develop

parents fcec5069 98281dee
......@@ -3,7 +3,7 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain;
package com.utclo23.ihmmain;
/**
*
......@@ -11,4 +11,6 @@ package com.utclo23.battleship.ihmmain;
*/
public class IHMMain {
public void toMenu(){
}
}
......@@ -3,7 +3,7 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain.controller;
package com.utclo23.ihmmain.controller;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
......
......@@ -3,7 +3,7 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain.controller;
package com.utclo23.ihmmain.controller;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
......
......@@ -3,10 +3,11 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain.controller;
package com.utclo23.ihmmain.controller;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
/**
......@@ -14,12 +15,31 @@ import javafx.scene.control.Label;
* @author Linxuhao
*/
public class MenuController {
@FXML
private Label label;
@FXML
private void handleButtonAction(ActionEvent event) {
System.out.println("You clicked me!");
label.setText("Hello World!");
private Button playButton;
@FXML
private Label title;
@FXML
private Button profileButton;
@FXML
private Button PlayerListButton;
@FXML
private Button exitButton;
@FXML
private void play(ActionEvent event) {
}
@FXML
private void showProfile(ActionEvent event) {
}
@FXML
private void showPlayerList(ActionEvent event) {
}
@FXML
private void exit(ActionEvent event) {
}
}
......@@ -3,7 +3,7 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain.controller;
package com.utclo23.ihmmain.controller;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.ihmmain.facade;
import com.utclo23.ihmmain.IHMMain;
/**
*
* @author Linxuhao
*/
public class IHMMainFacade implements IHMMainToIhmTable{
IHMMain ihmmain;
@Override
public void returnMenu(){
ihmmain.toMenu();
}
}
......@@ -3,12 +3,16 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain;
package com.utclo23.ihmmain.facade;
/**
*
* @author Linxuhao
*/
public class IHMMainFacade {
public interface IHMMainToIhmTable {
/**
* return to menu page
* linxuhao
*/
public abstract void returnMenu();
}
......@@ -6,7 +6,7 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.battleship.ihmmain.controller.CreateUserController">
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.ihmmain.controller.CreateUserController">
<children>
<Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
<Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
......
......@@ -6,7 +6,7 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.battleship.ihmmain.controller.LoginController">
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.ihmmain.controller.LoginController">
<children>
<Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
<Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
......
......@@ -6,9 +6,12 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.battleship.ihmmain.controller.MenuController">
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" fx:controller="com.utclo23.ihmmain.controller.MenuController">
<children>
<Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
<Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
<Button fx:id="playButton" layoutX="136.0" layoutY="45.0" onAction="#play" text="Play" />
<Label fx:id="title" layoutX="125.0" layoutY="12.0" minHeight="16" minWidth="69" text="Battleship" />
<Button fx:id="profileButton" layoutX="126.0" layoutY="82.0" onAction="#showProfile" text="Profile" />
<Button fx:id="PlayerListButton" layoutX="116.0" layoutY="118.0" onAction="#showPlayerList" text="PlayerList" />
<Button fx:id="exitButton" layoutX="135.0" layoutY="153.0" onAction="#exit" text="Exit" />
</children>
</AnchorPane>
......@@ -6,7 +6,7 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.battleship.ihmmain.controller.PlayerProfileController">
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.ihmmain.controller.PlayerProfileController">
<children>
<Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
<Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment