- renamed fxml and their controllers to match - removed old controllers - finished lobby and lobbyhost controllers #story[1261]main
parent
a5d3434a70
commit
a5050b8ea8
@ -1,4 +1,4 @@
|
|||||||
package visualiser.Controllers2;
|
package visualiser.Controllers;
|
||||||
|
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.property.Property;
|
import javafx.beans.property.Property;
|
||||||
@ -1,32 +0,0 @@
|
|||||||
package visualiser.Controllers;
|
|
||||||
|
|
||||||
import javafx.fxml.Initializable;
|
|
||||||
|
|
||||||
import java.net.URL;
|
|
||||||
import java.util.ResourceBundle;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Controller parent for app controllers.
|
|
||||||
* Created by fwy13 on 15/03/2017.
|
|
||||||
*/
|
|
||||||
public abstract class Controller implements Initializable {
|
|
||||||
protected MainController parent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the parent of the application
|
|
||||||
*
|
|
||||||
* @param parent controller
|
|
||||||
*/
|
|
||||||
public void setParent(MainController parent) {
|
|
||||||
this.parent = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialisation class that is run on start up.
|
|
||||||
*
|
|
||||||
* @param location resources location
|
|
||||||
* @param resources resources bundle
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public abstract void initialize(URL location, ResourceBundle resources);
|
|
||||||
}
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package visualiser.Controllers2;
|
package visualiser.Controllers;
|
||||||
|
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
@ -1,135 +0,0 @@
|
|||||||
package visualiser.Controllers;
|
|
||||||
|
|
||||||
import javafx.collections.ObservableList;
|
|
||||||
import javafx.fxml.FXML;
|
|
||||||
import javafx.scene.layout.AnchorPane;
|
|
||||||
import visualiser.Controllers2.FinishController;
|
|
||||||
import visualiser.Controllers2.StartController;
|
|
||||||
import visualiser.Controllers2.TitleController;
|
|
||||||
import visualiser.gameController.ControllerClient;
|
|
||||||
import visualiser.model.VisualiserBoat;
|
|
||||||
import visualiser.model.VisualiserRaceEvent;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.Socket;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.util.ResourceBundle;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Controller that everything is overlayed onto. This makes it so that changing scenes does not resize your stage.
|
|
||||||
*/
|
|
||||||
public class MainController extends Controller {
|
|
||||||
|
|
||||||
@FXML private StartController startController;
|
|
||||||
@FXML private RaceController raceController;
|
|
||||||
@FXML private ConnectionController connectionController;
|
|
||||||
@FXML private FinishController finishController;
|
|
||||||
@FXML private TitleController titleController;
|
|
||||||
@FXML private HostController hostController;
|
|
||||||
@FXML private LobbyController lobbyController;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Ctor.
|
|
||||||
*/
|
|
||||||
public MainController() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transitions from the StartController screen (displays pre-race information) to the RaceController (displays the actual race).
|
|
||||||
* @param visualiserRace The object modelling the race.
|
|
||||||
* @param controllerClient Socket Client that manipulates the controller.
|
|
||||||
* @param isHost if the client is the host of a race or not.
|
|
||||||
*/
|
|
||||||
public void beginRace(VisualiserRaceEvent visualiserRace, ControllerClient controllerClient, Boolean isHost) {
|
|
||||||
raceController.startRace(visualiserRace, controllerClient, isHost);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void endEvent() throws IOException { hostController.endEvent(); }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transitions from the server selection screen to the pre-race lobby for a given server.
|
|
||||||
* @param socket The server to read data from.
|
|
||||||
* @param isHost is connection a host
|
|
||||||
*/
|
|
||||||
public void enterLobby(Socket socket, Boolean isHost) {
|
|
||||||
startController.enterLobby(socket, isHost);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transitions from the {@link RaceController} screen to the {@link FinishController} screen.
|
|
||||||
* @param boats The boats to display on the finish screen.
|
|
||||||
*/
|
|
||||||
public void enterFinish(ObservableList<VisualiserBoat> boats) {
|
|
||||||
finishController.loadFinish(boats);
|
|
||||||
}
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * Transitions into the title screen
|
|
||||||
// */
|
|
||||||
// public void enterTitle() {
|
|
||||||
// titleController.enterTitle();
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transitions into lobby screen
|
|
||||||
*/
|
|
||||||
public void enterLobby(){ lobbyController.enterLobby(); }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transitions into host game screen
|
|
||||||
*/
|
|
||||||
public void hostGame(){ hostController.hostGame(); }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up the css for the start of the program
|
|
||||||
*/
|
|
||||||
public void startCss(){titleController.setDayMode();}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Main Controller for the applications will house the menu and the displayed pane.
|
|
||||||
*
|
|
||||||
* @param location of resources
|
|
||||||
* @param resources bundle
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void initialize(URL location, ResourceBundle resources) {
|
|
||||||
|
|
||||||
// startController.setParent(this);
|
|
||||||
// raceController.setParent(this);
|
|
||||||
// connectionController.setParent(this);
|
|
||||||
// finishController.setParent(this);
|
|
||||||
// titleController.setParent(this);
|
|
||||||
// hostController.setParent(this);
|
|
||||||
// lobbyController.setParent(this);
|
|
||||||
|
|
||||||
|
|
||||||
// AnchorPane.setTopAnchor(startController.startWrapper(), 0.0);
|
|
||||||
// AnchorPane.setBottomAnchor(startController.startWrapper(), 0.0);
|
|
||||||
// AnchorPane.setLeftAnchor(startController.startWrapper(), 0.0);
|
|
||||||
// AnchorPane.setRightAnchor(startController.startWrapper(), 0.0);
|
|
||||||
|
|
||||||
AnchorPane.setTopAnchor(lobbyController.startWrapper(), 0.0);
|
|
||||||
AnchorPane.setBottomAnchor(lobbyController.startWrapper(), 0.0);
|
|
||||||
AnchorPane.setLeftAnchor(lobbyController.startWrapper(), 0.0);
|
|
||||||
AnchorPane.setRightAnchor(lobbyController.startWrapper(), 0.0);
|
|
||||||
|
|
||||||
// AnchorPane.setTopAnchor(hostController.startWrapper(), 0.0);
|
|
||||||
// AnchorPane.setBottomAnchor(hostController.startWrapper(), 0.0);
|
|
||||||
// AnchorPane.setLeftAnchor(hostController.startWrapper(), 0.0);
|
|
||||||
// AnchorPane.setRightAnchor(hostController.startWrapper(), 0.0);
|
|
||||||
|
|
||||||
// AnchorPane.setTopAnchor(finishController.finishWrapper, 0.0);
|
|
||||||
// AnchorPane.setBottomAnchor(finishController.finishWrapper, 0.0);
|
|
||||||
// AnchorPane.setLeftAnchor(finishController.finishWrapper, 0.0);
|
|
||||||
// AnchorPane.setRightAnchor(finishController.finishWrapper, 0.0);
|
|
||||||
|
|
||||||
// AnchorPane.setTopAnchor(titleController.titleWrapper, 0.0);
|
|
||||||
// AnchorPane.setBottomAnchor(titleController.titleWrapper, 0.0);
|
|
||||||
// AnchorPane.setLeftAnchor(titleController.titleWrapper, 0.0);
|
|
||||||
// AnchorPane.setRightAnchor(titleController.titleWrapper, 0.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package visualiser.Controllers2;
|
package visualiser.Controllers;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<?import javafx.scene.image.*?>
|
|
||||||
<?import java.lang.*?>
|
|
||||||
<?import javafx.scene.layout.*?>
|
|
||||||
|
|
||||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="350.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
|
||||||
<children>
|
|
||||||
<ImageView fitHeight="385.0" fitWidth="600.0" layoutY="-2.0" pickOnBounds="true" preserveRatio="true" AnchorPane.bottomAnchor="-1.9456787109375" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="-2.0">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/game_controls.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
</children>
|
|
||||||
</AnchorPane>
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
<!--<?xml version="1.0" encoding="UTF-8"?>-->
|
|
||||||
|
|
||||||
<!--<?import java.lang.*?>-->
|
|
||||||
<!--<?import javafx.scene.control.*?>-->
|
|
||||||
<!--<?import javafx.scene.text.*?>-->
|
|
||||||
<!--<?import javafx.scene.control.Button?>-->
|
|
||||||
<!--<?import javafx.scene.control.Label?>-->
|
|
||||||
<!--<?import javafx.scene.layout.*?>-->
|
|
||||||
<!--<?import javafx.scene.text.Font?>-->
|
|
||||||
|
|
||||||
<!--<AnchorPane fx:id="hostWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" visible="false" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">-->
|
|
||||||
<!--<children>-->
|
|
||||||
<!--<GridPane AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">-->
|
|
||||||
<!--<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>-->
|
|
||||||
<!--<rowConstraints>-->
|
|
||||||
<!--<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />-->
|
|
||||||
<!--<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />-->
|
|
||||||
<!--<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />-->
|
|
||||||
<!--</rowConstraints>-->
|
|
||||||
<!--<children>-->
|
|
||||||
<!--<Button fx:id="hostGameBtn" mnemonicParsing="false" onAction="#hostGamePressed" text="Start Game" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2">-->
|
|
||||||
<!--<font>-->
|
|
||||||
<!--<Font size="20.0" />-->
|
|
||||||
<!--</font>-->
|
|
||||||
<!--</Button>-->
|
|
||||||
<!--<Label text="Address: 127.0.0.1" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="TOP">-->
|
|
||||||
<!--<font>-->
|
|
||||||
<!--<Font size="17.0" />-->
|
|
||||||
<!--</font>-->
|
|
||||||
<!--</Label>-->
|
|
||||||
<!--<Label text="Port: 4942" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">-->
|
|
||||||
<!--<font>-->
|
|
||||||
<!--<Font size="17.0" />-->
|
|
||||||
<!--</font>-->
|
|
||||||
<!--</Label>-->
|
|
||||||
<!--<Button mnemonicParsing="false" onAction="#menuBtnPressed" text="Main Menu" GridPane.halignment="CENTER" />-->
|
|
||||||
<!--</children>-->
|
|
||||||
<!--</GridPane>-->
|
|
||||||
<!--</children>-->
|
|
||||||
<!--</AnchorPane>-->
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
|
||||||
<AnchorPane fx:id="main" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.MainController">
|
|
||||||
<children>
|
|
||||||
<fx:include fx:id="race" source="race.fxml" />
|
|
||||||
<fx:include fx:id="start" source="start.fxml" />
|
|
||||||
<fx:include fx:id="connection" source="connect.fxml" />
|
|
||||||
<fx:include fx:id="finish" source="finish.fxml" />
|
|
||||||
<fx:include fx:id="host" source="hostLobby.fxml" />
|
|
||||||
<fx:include fx:id="title" source="titleScreen.fxml" />
|
|
||||||
<fx:include fx:id="lobby" source="lobby.fxml" />
|
|
||||||
</children>
|
|
||||||
</AnchorPane>
|
|
||||||
@ -1,61 +1,85 @@
|
|||||||
<!--<?xml version="1.0" encoding="UTF-8"?>-->
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<!--<?import javafx.geometry.*?>-->
|
<?import javafx.scene.control.Button?>
|
||||||
<!--<?import javafx.scene.control.*?>-->
|
<?import javafx.scene.control.RadioButton?>
|
||||||
<!--<?import javafx.scene.layout.*?>-->
|
<?import javafx.scene.image.*?>
|
||||||
<!--<?import javafx.scene.text.Font?>-->
|
<?import javafx.scene.layout.*?>
|
||||||
<!--<AnchorPane fx:id="connectionWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.ConnectionController">-->
|
<?import javafx.scene.text.*?>
|
||||||
<!--<children>-->
|
<AnchorPane fx:id="titleWrapper" maxHeight="600.0" maxWidth="800.0" minHeight="600.0" minWidth="800.0" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.TitleController">
|
||||||
<!--<GridPane AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">-->
|
<children>
|
||||||
<!--<columnConstraints>-->
|
<GridPane layoutY="39.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="800.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<!--<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />-->
|
<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 hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
<!--<rowConstraints>-->
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
<!--<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />-->
|
</columnConstraints>
|
||||||
<!--<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />-->
|
<rowConstraints>
|
||||||
<!--<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />-->
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<!--</rowConstraints>-->
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<!--<children>-->
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<!--<Button fx:id="hostGameTitleBtn" maxWidth="204.0" mnemonicParsing="false" text="Host Game" GridPane.halignment="LEFT" GridPane.rowIndex="1">-->
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<!--<font>-->
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<!--<Font size="20.0" />-->
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<!--</font>-->
|
</rowConstraints>
|
||||||
<!--<GridPane.margin>-->
|
<children>
|
||||||
<!--<Insets left="50.0" />-->
|
<Pane prefHeight="20.0" prefWidth="20.0" style="-fx-background-color: #0061ff;" GridPane.columnSpan="4" GridPane.rowIndex="4" GridPane.rowSpan="2">
|
||||||
<!--</GridPane.margin>-->
|
<children>
|
||||||
<!--</Button>-->
|
<Text fx:id="txtTitle" layoutX="167.0" layoutY="136.0" strokeType="OUTSIDE" strokeWidth="0.0" text="The Boat Game!">
|
||||||
<!--<Button fx:id="connectGameBtn" maxWidth="204.0" mnemonicParsing="false" text="Connect to Game" GridPane.columnIndex="2" GridPane.halignment="RIGHT" GridPane.rowIndex="1">-->
|
<font>
|
||||||
<!--<font>-->
|
<Font name="Comic Sans MS" size="64.0" />
|
||||||
<!--<Font size="20.0" />-->
|
</font>
|
||||||
<!--</font>-->
|
</Text>
|
||||||
<!--<GridPane.margin>-->
|
<Text layoutX="690.0" layoutY="80.0" strokeType="OUTSIDE" strokeWidth="0.0" text="TM">
|
||||||
<!--<Insets right="50.0" />-->
|
<font>
|
||||||
<!--</GridPane.margin>-->
|
<Font name="Comic Sans MS" size="12.0" />
|
||||||
<!--</Button>-->
|
</font>
|
||||||
<!--<RadioButton fx:id="nightRadioBtn" mnemonicParsing="false" text="Night Mode" GridPane.columnIndex="1" GridPane.halignment="LEFT" GridPane.rowIndex="2">-->
|
</Text>
|
||||||
<!--<padding>-->
|
<RadioButton fx:id="nightModeRD" layoutX="681.0" layoutY="168.0" mnemonicParsing="false" onAction="#setNightMode" text="Night Mode" />
|
||||||
<!--<Insets bottom="-50.0" />-->
|
<RadioButton fx:id="dayModeRD" layoutX="574.0" layoutY="168.0" mnemonicParsing="false" onAction="#setDayMode" selected="true" text="Day Mode" />
|
||||||
<!--</padding>-->
|
<Button layoutX="28.0" layoutY="152.0" mnemonicParsing="false" onAction="#showControls" text="Controls" />
|
||||||
<!--<GridPane.margin>-->
|
</children>
|
||||||
<!--<Insets left="80.0" />-->
|
</Pane>
|
||||||
<!--</GridPane.margin>-->
|
<Pane prefHeight="20.0" prefWidth="20.0" style="-fx-background-color: #6be6ff;" GridPane.columnSpan="4" GridPane.rowSpan="4">
|
||||||
<!--</RadioButton>-->
|
<children>
|
||||||
<!--<RadioButton fx:id="dayRadioBtn" mnemonicParsing="false" text="Day Mode" GridPane.columnIndex="1" GridPane.halignment="LEFT" GridPane.rowIndex="2">-->
|
<ImageView fx:id="imgBoat" fitHeight="404.0" fitWidth="296.0" layoutX="268.0" pickOnBounds="true" preserveRatio="true">
|
||||||
<!--<padding>-->
|
<image>
|
||||||
<!--<Insets top="-50.0" />-->
|
<Image url="@../images/boat.png" />
|
||||||
<!--</padding>-->
|
</image>
|
||||||
<!--<GridPane.margin>-->
|
</ImageView>
|
||||||
<!--<Insets left="80.0" />-->
|
<ImageView fx:id="imgCloud1" fitHeight="291.0" fitWidth="307.0" pickOnBounds="true" preserveRatio="true">
|
||||||
<!--</GridPane.margin>-->
|
<image>
|
||||||
<!--</RadioButton>-->
|
<Image url="@../images/cloud.png" />
|
||||||
<!--<Label text="Game" textAlignment="CENTER" GridPane.columnIndex="1" GridPane.halignment="CENTER">-->
|
</image>
|
||||||
<!--<font>-->
|
</ImageView>
|
||||||
<!--<Font size="60.0" />-->
|
<ImageView fx:id="imgWhale" fitHeight="113.0" fitWidth="98.0" layoutX="69.0" layoutY="302.0" pickOnBounds="true" preserveRatio="true">
|
||||||
<!--</font>-->
|
<image>
|
||||||
<!--</Label>-->
|
<Image url="@../images/whale.png" />
|
||||||
<!--</children>-->
|
</image>
|
||||||
<!--</GridPane>-->
|
</ImageView>
|
||||||
<!--</children>-->
|
<ImageView fx:id="imgCloud2" fitHeight="291.0" fitWidth="307.0" layoutX="501.0" pickOnBounds="true" preserveRatio="true">
|
||||||
<!--</AnchorPane>-->
|
<image>
|
||||||
|
<Image url="@../images/cloud.png" />
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
<ImageView fx:id="imgSun" fitHeight="154.0" fitWidth="145.0" layoutX="701.0" layoutY="-39.0" pickOnBounds="true" preserveRatio="true">
|
||||||
|
<image>
|
||||||
|
<Image url="@../images/sun.png" />
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
<Button fx:id="btnJoin" layoutX="78.0" layoutY="149.0" mnemonicParsing="false" onAction="#joinAGame" prefHeight="31.0" prefWidth="130.0" text="Join a Game">
|
||||||
|
<font>
|
||||||
|
<Font name="Comic Sans MS Bold" size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Button>
|
||||||
|
<Button layoutX="578.0" layoutY="150.0" mnemonicParsing="false" onAction="#hostAGame" prefHeight="31.0" prefWidth="130.0" text="Host a Game">
|
||||||
|
<font>
|
||||||
|
<Font name="Comic Sans MS Bold" size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Button>
|
||||||
|
</children>
|
||||||
|
</Pane>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
|||||||
@ -1,85 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<?import javafx.scene.control.Button?>
|
|
||||||
<?import javafx.scene.control.RadioButton?>
|
|
||||||
<?import javafx.scene.image.*?>
|
|
||||||
<?import javafx.scene.layout.*?>
|
|
||||||
<?import javafx.scene.text.*?>
|
|
||||||
<AnchorPane fx:id="titleWrapper" maxHeight="600.0" maxWidth="800.0" minHeight="600.0" minWidth="800.0" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers2.TitleController">
|
|
||||||
<children>
|
|
||||||
<GridPane layoutY="39.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="800.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
|
||||||
<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>
|
|
||||||
<rowConstraints>
|
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
|
||||||
</rowConstraints>
|
|
||||||
<children>
|
|
||||||
<Pane prefHeight="20.0" prefWidth="20.0" style="-fx-background-color: #0061ff;" GridPane.columnSpan="4" GridPane.rowIndex="4" GridPane.rowSpan="2">
|
|
||||||
<children>
|
|
||||||
<Text fx:id="txtTitle" layoutX="167.0" layoutY="136.0" strokeType="OUTSIDE" strokeWidth="0.0" text="The Boat Game!">
|
|
||||||
<font>
|
|
||||||
<Font name="Comic Sans MS" size="64.0" />
|
|
||||||
</font>
|
|
||||||
</Text>
|
|
||||||
<Text layoutX="690.0" layoutY="80.0" strokeType="OUTSIDE" strokeWidth="0.0" text="TM">
|
|
||||||
<font>
|
|
||||||
<Font name="Comic Sans MS" size="12.0" />
|
|
||||||
</font>
|
|
||||||
</Text>
|
|
||||||
<RadioButton fx:id="nightModeRD" layoutX="681.0" layoutY="168.0" mnemonicParsing="false" onAction="#setNightMode" text="Night Mode" />
|
|
||||||
<RadioButton fx:id="dayModeRD" layoutX="574.0" layoutY="168.0" mnemonicParsing="false" onAction="#setDayMode" selected="true" text="Day Mode" />
|
|
||||||
<Button layoutX="28.0" layoutY="152.0" mnemonicParsing="false" onAction="#showControls" text="Controls" />
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
<Pane prefHeight="20.0" prefWidth="20.0" style="-fx-background-color: #6be6ff;" GridPane.columnSpan="4" GridPane.rowSpan="4">
|
|
||||||
<children>
|
|
||||||
<ImageView fx:id="imgBoat" fitHeight="404.0" fitWidth="296.0" layoutX="268.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/boat.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<ImageView fx:id="imgCloud1" fitHeight="291.0" fitWidth="307.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/cloud.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<ImageView fx:id="imgWhale" fitHeight="113.0" fitWidth="98.0" layoutX="69.0" layoutY="302.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/whale.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<ImageView fx:id="imgCloud2" fitHeight="291.0" fitWidth="307.0" layoutX="501.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/cloud.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<ImageView fx:id="imgSun" fitHeight="154.0" fitWidth="145.0" layoutX="701.0" layoutY="-39.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/sun.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<Button fx:id="btnJoin" layoutX="78.0" layoutY="149.0" mnemonicParsing="false" onAction="#joinAGame" prefHeight="31.0" prefWidth="130.0" text="Join a Game">
|
|
||||||
<font>
|
|
||||||
<Font name="Comic Sans MS Bold" size="16.0" />
|
|
||||||
</font>
|
|
||||||
</Button>
|
|
||||||
<Button layoutX="578.0" layoutY="150.0" mnemonicParsing="false" onAction="#hostAGame" prefHeight="31.0" prefWidth="130.0" text="Host a Game">
|
|
||||||
<font>
|
|
||||||
<Font name="Comic Sans MS Bold" size="16.0" />
|
|
||||||
</font>
|
|
||||||
</Button>
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
</children>
|
|
||||||
</GridPane>
|
|
||||||
</children>
|
|
||||||
</AnchorPane>
|
|
||||||
Loading…
Reference in new issue