Fixed fxml issues due to merge. Added pane centering for panes. #story[1188]

main
David Wu 9 years ago
parent d2f0c1105a
commit 028428da2c

@ -53,6 +53,9 @@ public class HostController extends Controller {
@FXML @FXML
private Pane playerPane; private Pane playerPane;
@FXML
private Pane playerPane4;
private Event game; private Event game;
private View3D fancyStuff; private View3D fancyStuff;
@ -60,8 +63,13 @@ public class HostController extends Controller {
@Override @Override
public void initialize(URL location, ResourceBundle resources) { public void initialize(URL location, ResourceBundle resources) {
fancyStuff = new View3D(); fancyStuff = new View3D();
playerPane.getChildren().add(fancyStuff); playerPane4.getChildren().add(fancyStuff);
//centering the 3d object
fancyStuff.layoutXProperty().bind(playerPane4.widthProperty().subtract(fancyStuff.widthProperty()).divide(2));
fancyStuff.layoutYProperty().bind(playerPane4.heightProperty().subtract(fancyStuff.heightProperty()).divide(2));
//playerContainer.add(fancyStuff, 0,0); //playerContainer.add(fancyStuff, 0,0);
fancyStuff.spinBox(); fancyStuff.spinBox();
} }

@ -94,7 +94,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" 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"> <Pane fx:id="playerPane4" 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>
@ -145,7 +145,7 @@
<Insets left="20.0" /> <Insets left="20.0" />
</GridPane.margin> </GridPane.margin>
</Button> </Button>
<Button alignment="CENTER_RIGHT" contentDisplay="RIGHT" mnemonicParsing="false" onAction="#startBtnPressed" text="Start Game" GridPane.columnIndex="2" GridPane.halignment="RIGHT" GridPane.rowIndex="2"> <Button alignment="CENTER_RIGHT" contentDisplay="RIGHT" mnemonicParsing="false" onAction="#startBtnPressed" text="Start Game" GridPane.columnIndex="2" GridPane.halignment="RIGHT" GridPane.rowIndex="4">
<GridPane.margin> <GridPane.margin>
<Insets right="20.0" /> <Insets right="20.0" />
</GridPane.margin> </GridPane.margin>
@ -155,17 +155,6 @@
<Font size="16.0" /> <Font size="16.0" />
</font> </font>
</Label> </Label>
<GridPane fx:id="playerContainer" GridPane.columnSpan="3" GridPane.rowIndex="1">
<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>
</GridPane>
</children> </children>
</GridPane> </GridPane>
<Label alignment="TOP_CENTER" text="Get Ready For The Next Race" textFill="#fffdfd" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="20.0"> <Label alignment="TOP_CENTER" text="Get Ready For The Next Race" textFill="#fffdfd" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="20.0">

Loading…
Cancel
Save