Game Development Reference
In-Depth Information
Scene Graph Assets: Installing the ImageView's Image
Assets in Your Project
To reference the digital image assets inside the JAR file in your Java code, you have to
insert a forward slash before the file name. Before you can reference the files, however,
you must copy these image files from the topic repository into the Computer/Com-
puterName/Users/user/MyDocuments/NetBeansProjects/InvinciBagel/src folder, as
shown on the left-hand side (and the top) of Figure 6-6 . You can also see how these di-
gital image assets will composite, as the background plate invincibagelsplash PNG24
has a spot for the other three PNG32 images to overlay (cover). The white areas seen in
the composite ImageView assets are actually transparent! Now, you are ready!
Figure 6-6 . Windows 7 Explorer file management utility, showing a PNG24 splash screen and three PNG32 overlays
JavaFX UI Classes: HBox, Pos, Insets,
and ImageView
Let's take a break from coding for an in-depth look at some of the new classes you are
going to use to complete your top-level game application UI design. These include the
Pos class (positioning); the Insets class (padding); the HBox class (UI layout contain-
er); the Image class (digital image container); the ImageView class (digital image dis-
 
 
Search WWH ::




Custom Search