Game Development Reference
In-Depth Information
4. Inside the <layer> element, we need a <panel> element that will contain the
rest of our layout:
<panel id="inventoryPanel" childLayout="horizontal">
5. The next element is a panel that will keep our dynamically created itemSlots :
<panel id="inventorySlots" childLayout="horizontal"/>
The following screenshot shows us the dynamically created item slots:
After this, we create a simple representation of a humanoid with two hands and
feet, using the itemSlot control. We use align and childLayout to make
the components appear where we want them to.
6. First, add a panel to contain the components:
<panel id="characterPanel" childLayout="vertical">
7. Then, add the head using the following command:
<panel id="character" backgroundColor="#000f"
childLayout="center" align="center" valign="top">
<control name="itemSlot" id="Head"/>
</panel>
8. Add one left and right hand using the following command:
Search WWH ::




Custom Search