Using UIRenderer Sprites#

To perform rendering and use sprites in UIRenderer:

  1. Create any sprites that are required using UIRenderer->createFont(…), createImage(…), createText(…), createMatrixGroup(…), and so on.

  2. Set up sprites with setColour() and setText().

  3. Create hierarchies by adding the sprites to groups.

  4. Lay out sprites/groups using setPosition(), and so on.

  5. 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 which render() is called will be rendered relative to the top level (screen), not taking into account any containers to which it may belong.