Player panes and spectator list now call method on click. Will later be used for players to choose whether they want to play or spectate. #story[1188]
This commit is contained in:
@@ -119,4 +119,12 @@ public class HostController extends Controller {
|
|||||||
System.out.println("Should start the race. This button is only visible for the host");
|
System.out.println("Should start the race. This button is only visible for the host");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void joinSpecPressed(){
|
||||||
|
System.out.println("Spectator list pressed. Joining spectators");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void joinRacePressed(){
|
||||||
|
System.out.println("Empty race user pane pressed. Joining racers");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<children>
|
<children>
|
||||||
<AnchorPane GridPane.rowIndex="1">
|
<AnchorPane GridPane.rowIndex="1">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutX="22.0" layoutY="28.0" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
<Pane layoutX="22.0" layoutY="28.0" onMouseClicked="#joinRacePressed" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" 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>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<AnchorPane layoutX="10.0" layoutY="78.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
<AnchorPane layoutX="10.0" layoutY="78.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutX="22.0" layoutY="28.0" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
<Pane layoutX="22.0" layoutY="28.0" onMouseClicked="#joinRacePressed" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets />
|
<Insets />
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<AnchorPane layoutX="209.0" layoutY="78.0" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
<AnchorPane layoutX="209.0" layoutY="78.0" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutX="22.0" layoutY="28.0" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
<Pane layoutX="22.0" layoutY="28.0" onMouseClicked="#joinRacePressed" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets />
|
<Insets />
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<AnchorPane layoutX="408.0" layoutY="78.0" GridPane.rowIndex="3">
|
<AnchorPane layoutX="408.0" layoutY="78.0" GridPane.rowIndex="3">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutX="22.0" layoutY="28.0" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
<Pane layoutX="22.0" layoutY="28.0" onMouseClicked="#joinRacePressed" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets />
|
<Insets />
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<AnchorPane layoutX="10.0" layoutY="334.0" GridPane.columnIndex="1" GridPane.rowIndex="3">
|
<AnchorPane layoutX="10.0" layoutY="334.0" GridPane.columnIndex="1" GridPane.rowIndex="3">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutX="22.0" layoutY="28.0" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
<Pane layoutX="22.0" layoutY="28.0" onMouseClicked="#joinRacePressed" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets />
|
<Insets />
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<AnchorPane layoutX="209.0" layoutY="334.0" GridPane.columnIndex="2" GridPane.rowIndex="3">
|
<AnchorPane layoutX="209.0" layoutY="334.0" GridPane.columnIndex="2" GridPane.rowIndex="3">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutX="22.0" layoutY="28.0" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
<Pane layoutX="22.0" layoutY="28.0" onMouseClicked="#joinRacePressed" prefHeight="150.0" prefWidth="156.0" style="-fx-border-color: black; -fx-background-color: rgba(100, 100, 100, 0.8);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="0.0" GridPane.rowIndex="1">
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets />
|
<Insets />
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<AnchorPane fx:id="specPane" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
|
<AnchorPane fx:id="specPane" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
|
||||||
<children>
|
<children>
|
||||||
<TableView prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: rgba(60, 60, 60, 1);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<TableView onMouseClicked="#joinSpecPressed" prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: rgba(60, 60, 60, 1);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn prefWidth="173.0" text="Spectators" />
|
<TableColumn prefWidth="173.0" text="Spectators" />
|
||||||
</columns>
|
</columns>
|
||||||
|
|||||||
Reference in New Issue
Block a user