Game Development Reference
In-Depth Information
Why?
Each of these images are 128 pixels tall. Offsetting by -128 when the
Transform Y = 1, make the texture aligned to the top of the screen.
Step 7:
Change the Pixel Inset X value to spread out the GUITextures.
Leave InventoryButton_Flashlight as is. Change the InventoryButton_
Pistol's Pixel Inset X
= 128
(slides it over an additional 128 pixels).
Change InventoryButton_EMP's Pixel Inset X
= 256
, and finally change
InventoryButton_Tab's Pixel Inset X
= 384
.
Step 8:
Change the Alpha value for each texture to
64
. Do this for each
GUITexture, but click the color swatch (in the Inspector panel in the
GUITexture component) and change the A slider (
Figure 16.1
). The final
results should look like
Figure 16.2
.
Figure 16.1
Adjusting the alpha.
Figure 16.2
Initial GUI Layout for
inventory system.
Why?
We're going to turn down the alpha values to make the buttons more
transparent. In a bit we'll create a script that swaps out these versions of
the buttons with a highlighted version that includes the name of each
tool. Those versions will be at full opacity.