Using UIRenderer Sprites#
To perform rendering and use sprites in UIRenderer:
Create any sprites that are required using
UIRenderer->createFont(…)
,createImage(…)
,createText(…)
,createMatrixGroup(…)
, and so on.Set up sprites with
setColour()
andsetText()
.Create hierarchies by adding the sprites to groups.
Lay out sprites/groups using
setPosition()
, and so on.Call
render()
on the top level sprite.Warning
Never call
render()
on sprites that are themselves in containers - only call render on the item containing other items. Otherwise, any sprite on whichrender()
is called will be rendered relative to the top level (screen), not taking into account any containers to which it may belong.