Eventually all these libs will become haxelibs, however, currently in their alpha form they do not even contain a haxelib.json
file (for dependencies, etc) and therefore can only be used by downloading the source and using the haxelib dev
command or by directly using the git versions using the haxelib git
command (recommended). Eg:
haxelib git haxeui-core https://github.com/haxeui/haxeui-core
haxelib dev haxeui-openfl path/to/expanded/source/archive
If however you already have an existing application, then incorporating HaxeUI into that application is straight forward:
Assuming `haxeui-core` and `haxeui-openfl` have been installed, then adding HaxeUI to your existing application is as simple as adding these two lines to your `project.xml` or your `application.xml`:<haxelib name="haxeui-core" />
<haxelib name="haxeui-openfl" />
Note: Currently you must also include haxeui-core
explicitly during the alpha, eventually haxelib.json
files will exist to take care of this dependency automatically.
Toolkit.init();
Once the toolkit is initialised you can add components using the methods specified here.
As well as using the generic Screen.instance.addComponent
, it is also possible to add components directly to any other OpenFL
sprite (eg: Lib.current.stage.addChild
)