Aidan63 / linc_imgui

Haxe/hxcpp @:native bindings for Dear ImGui
MIT License
44 stars 7 forks source link

Added demo project, using linc_imgui with Kha engine #3

Closed CoruNethron closed 6 years ago

CoruNethron commented 6 years ago

KhaImGuiDemo

Thank you for your great work.

Aidan63 commented 6 years ago

Very nice! I've been meaning to look into creating a Kha example but never got around to it. If you'd like I'd be happy to accept a PR to have your Kha demo in the tests folder. For now I'll add a link to it in the readme.

CoruNethron commented 6 years ago

It would be great to add this demo to tests folder. If you know, please clarify to me one detail. Kha demo includes linc_imgui repo as submodule / Library. So, after adding to tests it will be look like:

Would't it be an problem?

Aidan63 commented 6 years ago

Hmm, it might be, I'm not sure how git handles circular submodules. I don't really have any Kha experience but if the repo has the korefile.js at the root and it's installed through haxelib does it have to be in the Libraries folder or can Kha find it through haxelib?

Worse comes to worse you could place a non submodule version of the repo in there or a text file named something like "place linc_imgui folder here".

sh-dave commented 6 years ago

You can use a custom path for libraries in your khafile.js

project.localLibraryPath = '/some/custom/path';
project.addLibrary('foo'); // will lookup the lib from `/some/custom/path/foo` instead of 'Libraries/foo'

I never tried it to go up the path via ../.. so far, but maybe give it a shot and see if it works.

CoruNethron commented 6 years ago

@sh-dave , yeah, that seems to work. I leave project.localLibraryPath default, but used relative path, like '../../../../foo'

sh-dave commented 6 years ago

Ok cool, even better if you can set it per library nowadays.

Aidan63 commented 6 years ago

I've just merged the PR with the Kha demo so I'll go ahead and close this issue.