Game Development Reference
In-Depth Information
plate image, based on the ActionEvents (clicks of the Button controls); and a VBox
Parent UI layout container will contain the four Button controls. You will also create an
Insets object to hold the padding values to fine-tune the button bank alignment.
Figure 6-3 . Primary splash screen Scene Graph node hierarchy, the objects it contains, and the assets it references
Because a Button object cannot be positioned individually, I had to use the HBox
class, along with an Insets class and a Pos class, to contain and position the Button
controls. I will be going over the classes you will be using for this high-level design in
this chapter so that you have an overview of every class that you are going to be adding
to your InvinciBagel class to create this top-level UI design.
The way I optimized the Scene Graph use for the four different screens needed to
match the four different buttons was to use one ImageView as a backplate to contain
the InvinciBagel splash screen artwork and then one more ImageView to contain differ-
ent composite images (overlays) that use transparency (alpha channel). In this way,
you can simulate four different screens, using only two ImageView Scene Graph Node
objects.
Finally, a TableView Scene Graph node will contain the table structure for the high
scores table. This will be created via the score engine, which you will be creating last,
after you finish your entire game design and programming. For now, you will leave the
High Scores and Play Game button code unimplemented.
 
Search WWH ::




Custom Search