HaxeLive is an open source, free library that allows you to generate UI based on JSON files within your application, which can then be used later for your game, or redistribute.
Get the library: https://github.com/ColourID/HaxeLive
haxelib git hxlive https://github.com/tienery/HaxeLive.git
An introduction video
This library parses JSON-formatted files into generated scenes that can be live-previewed for fast prototyping, as well as redistributed and reused for your projects.
In Main.hx, we have the following code to help us with the live preview capabilities:
class Main extends Sprite
private var live:Live;
private var _lastTime:Date;
public function new()
live = new Live("info/test.json");
For more information on how to use this library, see the incomplete WIKI.
I do have other plans for this repository, including implementing further backends. These include:
- Implementing live previewing for the following backends: Kha and HaxeFlixel (at least that’s my plans)
- Implementing an easier way to skin your UI using themes
- Easier management of scene generation so that you don’t have to recompile when changing what JSON file to test.
- Adding an Exporter so that the JSON-formatted files can translate into a usable Haxe file if you prefer the hard-coded approach (not a high priority).
If you wish to improve, make bug fixes etc. you can make a pull request. Just be sure that if you make a backend for your own library, that you match the API seen in the current backend for OpenFL.
And that’s it for my marketing campaign. Enjoy!