Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1

Chapter 9 ■ JavaFX 9 User InterFaCe DesIgn: the Front enD For Java 9 game DesIgn


Open the addNodesToStackPane() method. At the end of the method add an infoOverlay object and call
the .getChildren().addAll() method, with the playText and moreText objects separated by commas, as shown
in Figure 9-16.


Figure 9-15. Add Text objects to your TextFlow object and .setTranslateX() and .setTranslateY()


Figure 9-16. Add infoOverlay object to end of .addNodesToSceneGraph() and use .addAll() to add playText
and moreText objects to infoOverlay

Free download pdf