@lubos Is there a way to use Kha for UI in Armory. I know Armory is built on Kha but How do I do that?
Well, you can overwrite the notifyOnRender2D method inside the constructor. It will provide a graphics2 instance.
Something like this
> notifyOnRender2D(function(g:kha.graphics2.Graphics){
> g.begin();
> // .... Do your stuff
> g.end();
> })
Hope this helps
1 Like
Yeah, like @jesuCarrasco said, you can use Kha’s graphics2 API, for UI, but that will provide a very low level API. UI libraries built for Kha should work with Armory, too, like HaxeUI ( HaxeUI in particular is in alpha and I was having a little difficulty getting it to work with the example, though ).
1 Like
I will try that, the reason i am using direct kha is that because i can have image as button and is just experimenting. And HaxeUI is in alpha and have lots og bugs so i guess i will wait for haxeui to release stable build for Kha.
Thanks @jesuCarrasco and u too.
2 Likes