Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 22 ■ SCoring engine: Creating the SCore Ui LayoUt and SCoring the Content

The Java 9 code to complete the Score UI background and container is shown highlighted in Figure 22-8,
and your modified .setTranslateX() method call (from 250 X units to 650 X units) should look like the
following code:


scoreLayout.setTranslateX( 650 );


Figure 22-7. As you can see, this StackPane is intersecting with the game board and needs to move right 400
units in X


Figure 22-8. Change the scoreLayout.setTranslateX() method call from 250 to 650 to move the Score UI panel
by 400 units

Free download pdf