Skip to content

Instantly share code, notes, and snippets.

@algorev
Created August 21, 2018 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save algorev/828e865811d6de9b0872836144a15bff to your computer and use it in GitHub Desktop.
Save algorev/828e865811d6de9b0872836144a15bff to your computer and use it in GitHub Desktop.
openfl build neko
//in Source dir
package;
import openfl.display.Sprite;
import haxe.ui.Toolkit;
import haxe.ui.core.Screen;
import haxe.ui.macros.ComponentMacros;
import haxe.ui.containers.Box;
import haxe.ui.components.Button;
class Main extends Sprite {
public function new () {
super ();
Toolkit.init();
var root = ComponentMacros.buildComponent("assets/UI.xml");
Screen.instance.addComponent(root);
}
}
<?xml version="1.0" encoding="utf-8"?>
<project>
<meta title="Test" package="com.algorev.test" version="1.0.0" company="None Inc." />
<app main="Main" path="Export" file="Test" />
<source path="Source" />
<haxelib name="openfl" />
<haxelib name="haxeui-core" />
<haxelib name="haxeui-openfl" />
<assets path="Assets" rename="assets" />
</project>
<?xml version="1.0" encoding="utf-8" ?>
<!--In assets dir -->
<box height="100%" width="100%">
<hbox width="100%"></hbox>
<hbox width="100%" height="30px">
<textfield height="100%" width="100%"></textfield>
</hbox>
</box>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment