From the r3d9u11 haxe basics we can see multiple ways of doing it with pure HaxeUI i.e. with module.xml.
But with kha we can’t use module.xml or I just haven’t found the way to create the class and use the xml blob to assign to it like we can do with Toolkit.componentFromString.
The weird thing is that when I declare
<image resource="grid"/> it works. But when doing this
<grid style="background-image: grid/>" it doesn’t work and I get
haxe/ui/styles/Parser.hx:1316: Invalid value grid for css background-image. The name of the resource is grid.png and it’s in the Assets/** folder.