gui-box.md 1.4 KB


title: GUI box nodes in Defold

brief: This manual explains how to use GUI box nodes.

GUI box nodes

A box node is a rectangle filled with a color or a texture or animation.

Adding box nodes

Add new box nodes by either right clicking in the Outline and selecting Add ▸ Box, or press A and select Box.

You can use images and animations from atlases or tile sources that has been added to the GUI. You add textures by right clicking the Textures folder icon in the Outline and selecting Add ▸ Textures.... Then set the Texture property on the box node:

Textures

Note that the color of the box node will tint the graphics. The tint color is multiplied onto the image data, meaning that if you set the color to white (the default) no tint is applied.

Tinted texture

Box nodes are always rendered, even if they do not have a texture assigned to them, or have their alpha set to 0, or are sized 0, 0, 0. Box nodes should always have a texture assigned to them so the renderer can batch them properly and reduce the number of draw-calls.

Playing animations

Box nodes can play animations from atlases or tile sources. Refer to the flipbook animation manual to learn more.

:Slice-9