Appearance - SirePi/duality-ui GitHub Wiki
The Appearance of a [Control]] is the object that defines how said Control will appear in its various [States. To define an Appearance, you must define the following properties:
- Normal - the Material that will be used to draw the Control when in its Normal state.
- Hover - the Material that will be used to draw the Control when in its Hover state.
- Active - the Material that will be used to draw the Control when in its Active state.
- Disabled - the Material that will be used to draw the Control when in its Disabled state.
- Border - a Border object that defines how the Material should be used in a 9-patch form. Each property of the Border defines how many pixels will be used for the appropriate side of the 9-patch.
The Appearance of a Control is drawn as a 9-patch image, in which the Control itself is broken into 9 parts, each according to the following image:
The corner patches are drawn unscaled, the top and bottom ones are stretched along the X-axis, the left and right are stretched along the Y-axis, and the middle patch is stretched on both X and Y axes.