haxeui-openfl

The OpenFL backend of the HaxeUI framework


Keywords
gui, openfl, ui, haxe, haxeui-backend
License
MIT
Install
haxelib install haxeui-openfl 1.2.3

Documentation

Build Status Support this project on Patreon

haxeui-openfl

haxeui-openfl is the OpenFL backend for HaxeUI.

Installation

  • haxeui-openfl has a dependency to haxeui-core, and so that too must be installed.
  • haxeui-openfl also has a dependency to OpenFL, please refer to the installation instructions on their site.

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

Usage

The simplest method to create a new OpenFL application that is HaxeUI ready is to use one of the haxeui-templates. These templates will allow you to start a new project rapidly with HaxeUI support baked in.

If however you already have an existing application, then incorporating HaxeUI into that application is straight forward:

project/application.xml

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 initialisation and usage

Initialising the toolkit requires you to add this single line somewhere before you start to actually use HaxeUI in your application:

Toolkit.init();

Once the toolkit is initialised you can add components using the methods specified here.

OpenFL specifics

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)

Addtional resources

  • haxeui-api - The HaxeUI api docs.
  • haxeui-guides - Set of guides to working with HaxeUI and backends.
  • haxeui-demo - Demo application written using HaxeUI.
  • haxeui-templates - Set of templates for IDE's to allow quick project creation.
  • haxeui-bdd - A behaviour driven development engine written specifically for HaxeUI (uses haxe-bdd which is a gherkin/cucumber inspired project).
  • WWX2016 presentation - A presentation given at WWX2016 regarding HaxeUI.