openfl view example

This commit is contained in:
2013-10-11 15:57:55 +04:00
parent f57fabe75f
commit 99eba9fa50
2 changed files with 13 additions and 1 deletions

View File

@@ -17,7 +17,9 @@ class ViewExample implements ButtonViewListener {
}
public function new() {
var form:Dynamic = new Form().value;
//var form:Dynamic = new Form().value;
var bytes = openfl.Assets.getBytes("examples/form.json");
var form:Dynamic = haxe.Json.parse(bytes.readUTFBytes(bytes.bytesAvailable));
var v:IGroupView<Sprite> = GuiBuilder.build(form, {listener:this});
new Root(v);
var button3:ButtonView = v.findViewById("panel:button3");

10
project.xml Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<meta title="ViewExample" package="haxework.examples" version="1.0.0" company="MegaLoMania"/>
<app path="target" file="ViewExample" main="examples.ViewExample"/>
<window width="800" height="600" if="desktop"/>
<window width="0" height="0" if="html5"/>
<source path="."/>
<haxelib name="openfl"/>
<assets path="examples" include="*"/>
</project>