Game Development Reference
In-Depth Information
Box Layout: Makes the tedious task of evenly spacing nodes a snap. You
can align its child nodes horizontally or vertically, but alas, despite its name
you cannot align them on a grid with multiple rows and columns by itself.
However, you can use a horizontal Box Layout that contains multiple vertic-
al Box Layout nodes as children, each of which contains the nodes in each
column—or vice versa, with the horizontal and vertical alignment Box Lay-
out nodes swapped.
You have two ways of adding items from the Node Library onto the stage. Both involve
dragging the desired item from the Node Library and dropping it either directly onto the
Stage or dropping them on the left side of the Timeline View on another node. The latter
approach gives you the option to determine where in the hierarchy the node should be ad-
ded—in other words, what that node's parent should be.
If you drop the new node directly onto the stage, it will be added as a sibling of the cur-
rently selected node, or as a child of the root node for cases when the root node is selected
or when no node is selected.
Tip Selection can be performed by clicking on a node in the stage—or more
accurately, by selecting the desired node in the hierarchical Timeline View.
Multiple selections are possible by holding down the Shift or Cmd key while
selecting. You can delete selected nodes by pressing the Backspace key. You
can Edit
Undo most operations, including deletions, until you save the doc-
ument.
Creating a Button
Now drag and drop a button onto the stage or timeline. Position it anywhere on the
stage—that's fine for now. The new button will be selected and labeled “Title”.
On the Item Properties pane (to the right), you will see a large collection of values, but-
tons, check boxes, and text fields. The Button node is probably the most complex node of
them all. An example of its properties is shown in Figure 2-6 . Feel free to play with its
settings and values at this point; there's little you can do wrong. And if you do the wrong
thing, you can Undo or simply delete the button and drag a new one onto the stage to start
over.
Search WWH ::




Custom Search