Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Latest commit

 

History

History

README.md

Examples

Source PNGs

The PNGs used as sources for the different examples are:

panel button corner panel

All assets are created by Kenney.

As a plugin

Adding a simple 9-Patch UI element by using the NinePatchBundle component bundle.

example with plugin

Changing the size of a 9-Patch UI element by modifying the Style.size component.

changing size of component

To set the content of a 9-Patch UI element, you can specify an Entity when setting the NinePatchData component. This Entity will be set as a children of the 9-Patch UI element.

setting several contents

When more flexibility is needed to set the content, it can be done by creating a system with a query on the NinePatchContent component.

Complete example with:

  • a complex 9-Patch UI element with two different content zones and a top bar that has two different parts that can grow
  • 9-Patch UI elements inside a 9-Patch UI element inside a 9-Patch UI element
  • Some 9-Patch UI elements change size during time

full example