Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1

Chapter 10 ■ User InterfaCe DesIgn InteraCtIvIty: event hanDlIng anD ImagIng effeCts


Next, use your Run ➤ Project work process, and make sure your Disclaimers Button is configuring
your Text objects in a readable, organized format on a white background. As you’ll see in Figure 10-6, your UI
screen looks good, and you can move on to create a Game Credits Button object event handling structure by
again using copy and paste.


Figure 10-5. Implement the code in the handle() method to reconfigure your legalButton UI compositing layer
objects


Figure 10-6. Test UI Button event handling with the Start Game, Game Rules, and Disclaimers, switching
back and forth

Free download pdf