Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image can't be displayed #13

Open
R3D9477 opened this issue Apr 3, 2017 · 8 comments
Open

Image can't be displayed #13

R3D9477 opened this issue Apr 3, 2017 · 8 comments

Comments

@R3D9477
Copy link

R3D9477 commented Apr 3, 2017

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.

@R3D9477
Copy link
Author

R3D9477 commented Apr 4, 2017

for Kha image must be called without extension:
<image resource="Tux" /> (correct) instead of <image resource="Tux.jpg" /> (not correct)

@R3D9477 R3D9477 closed this as completed Apr 4, 2017
@sh-dave
Copy link
Contributor

sh-dave commented Apr 4, 2017

IMO, this should actually be handled by the kha backend, so you have consistent functionality across all backends.

@R3D9477
Copy link
Author

R3D9477 commented Apr 4, 2017

@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?

@sh-dave
Copy link
Contributor

sh-dave commented Apr 4, 2017

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".

@ianharrigan
Copy link
Member

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

@ianharrigan ianharrigan reopened this Apr 4, 2017
@ianharrigan
Copy link
Member

@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

@ianharrigan
Copy link
Member

ianharrigan commented Apr 4, 2017

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>

@R3D9477
Copy link
Author

R3D9477 commented Sep 11, 2017

@ianharrigan there was tested for html5 target (debugging in KhaStudio)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants