I'm new to Haxe/HaxeFlixel and I want to use an UI tool to make my game.
After some research I find 3 tools that seems to be good to make UI for Haxe.
- HaxeUI
- StablexUI
- flixel-ui
flixel-ui has a serious lack of documentation, so I'm leaning towards StablexUI. However, it's not integrated with HaxeFlixel.
I test to load it in a FlxState
but there are some issues.
- First, the cursor is behind the UI
- Second, the UI doesn't catch keyboard input
- Third, the text is not visible
This is my code:
override public function create():Void
{
FlxG.cameras.bgColor = 0xff131c1b;
FlxG.mouse.useSystemCursor = true;
UIBuilder.init();
Lib.current.addChild( UIBuilder.buildFn('ui/main.xml')() );
super.create();
}
And the XML:
<?xml version="1.0" encoding="UTF-8"?>
<HBox padding="10" childPadding="5">
<InputText id="'input'" skin:Paint-border="1" skin:Paint-color="0xFFFFFF" w="150" h="20" text="'type any message here'"/>
<!-- Here we create on-click handler wich shows our alert box with input message -->
<Button h="20" text="'Show me the alert!'" skin:Paint-color="0xbbbbbb" skin:Paint-border="1"/>
Is it possible to use StablexUI with HaxeFlixel, and if yes how?