Game Development Reference
In-Depth Information
ments into each Button event handler. If the ImageView Node objects are already set as
visible when these statements are triggered, then they will simply remain visible, be-
cause they were already previously visible! The Java method calls will look like the
following:
splashScreenBackplate.setVisible( false );
splashScreenTextArea.setVisible( false );
As you can see highlighted in Figure 9-4 , I've installed these (identical, except for
the Image object that they reference) two statements inside of the other three Button
event handling structures. These statements can go either before or after the existing
method calls inside each of these .handle() methods.
Figure 9-4 . Add in the .setVisible(true) method calls for the splashScreenBackplate and splashScreenTextArea ob-
jects
Now you will see that when you use your Run Project work process, that all of
your Button UI controls will do what they are supposed to do, and will display either a
white background for the game or information screens that have the InvinciBagel
splash screen artwork behind them. Now we are ready to learn about Java lambda ex-
pressions.
 
 
Search WWH ::




Custom Search