Image can't be displayed
Expected Behavior
A simple window with one image (jpg).
Current Behavior
Blank screen.
Test app / minimal test case
Sample available here.
Your Environment
Haxe 3.4.2 Kha from git haxeui-core from git haxeui-kha from git
Thanks.
for Kha image must be called without extension:
<image resource="Tux" /> (correct) instead of <image resource="Tux.jpg" /> (not correct)
IMO, this should actually be handled by the kha backend, so you have consistent functionality across all backends.
@sh-dave what did you mean?
Is it invalid behavior and bug of haxeui-kha backaned?
Does method <image resource="Tux.jpg" /> should be work?
IMO yes. If you can use <image resource="FILENAME.EXT" /> in say the OpenFL backend, you should also be able to use that in the Kha backend and not have to remember "oh, i'm on Kha, so i have to manually strip the extension".
This is handled by the backend, images are either use native to the framework, or are haxe resources and are converted into what is native to the framework. What haxe target are you using? CPP?
Either way, ill take a look at your sample when i get some time.
Cheers, Ian
@sh-dave: i see what you are saying though, the whole idea of haxeui is uniformity. That said, there are resource plugins that can handle this, that said, im not sure they are applied globally. Only to resources you explicitly include in module.xml
actually, they are global ( :) )... so something like this should work (its untested at the moment).
module.xml:
<module>
<plugins>
<plugin type="asset" class="haxe.ui.assets.AssetNamePlugin" if="kha" removeExtension="true"/>
</plugins>
</module>
@ianharrigan there was tested for html5 target (debugging in KhaStudio)