Game Development Reference
In-Depth Information
screen turns white because the two ImageView image plates are not visible anymore
and your white background color is shining through! You will notice if you click on the
other three Button controls that they do not work anymore. Actually they are working,
but they are not visible anymore, so the UI design now seems to be broken!
Figure 9-3 . Run the Project, and test the PLAY GAME Button to reveal white background
So now we have an ability to see what we are doing going into our game play
design chapters, which are the next eight in the topic. All that we have to do now is to
fix (or rather upgrade) the other three Button controls event handling structures to in-
clude method calls to make sure that the ImageView Node objects are visible so that
they can show the image content that we want them to display to our players. Let's take
care of this next, since we are working on the Button UI design for our InvinciBagel
game, and then we can take a look at the new Java 8 lambda expressions.
Upgrading the Other UI Button Code: Making
ImageView Visible
Let's add a couple of lines of code to each of the three existing Button event handling
structures that will make sure that both ImageView image plates are set to be visible
whenever these Button control objects are clicked. The reason that we need to put this
code into each of the three other UI Button event handling structures is because we do
not know what order the user will click on the Buttons, so we need to put these state-
 
Search WWH ::




Custom Search