Haxe/HaxeFlixel は初めてで、UI ツールを使用してゲームを作成したいと考えています。
いくつかの調査の結果、Haxe の UI を作成するのに適していると思われる 3 つのツールを見つけました。
- HaxeUI
- 安定UI
- flixel-ui
flixel-ui にはドキュメントが大幅に不足しているため、StablexUI に傾倒しています。ただし、HaxeFlixel とは統合されていません。
でロードするようにテストしましたFlxState
が、いくつかの問題があります。
- まず、カーソルが UI の後ろにある
- 第二に、UI はキーボード入力をキャッチしません
- 第三に、テキストは表示されません
これは私のコードです:
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();
}
そして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"/>
HaxeFlixel で StablexUI を使用することは可能ですか?