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

This commit is contained in:
David Wu
2017-08-30 12:04:17 +12:00
parent d2f0c1105a
commit 028428da2c
2 changed files with 11 additions and 14 deletions
@@ -53,6 +53,9 @@ public class HostController extends Controller {
@FXML
private Pane playerPane;
@FXML
private Pane playerPane4;
private Event game;
private View3D fancyStuff;
@@ -60,8 +63,13 @@ public class HostController extends Controller {
@Override
public void initialize(URL location, ResourceBundle resources) {
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);
fancyStuff.spinBox();
}