openfl view example
This commit is contained in:
@@ -17,7 +17,9 @@ class ViewExample implements ButtonViewListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function new() {
|
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});
|
var v:IGroupView<Sprite> = GuiBuilder.build(form, {listener:this});
|
||||||
new Root(v);
|
new Root(v);
|
||||||
var button3:ButtonView = v.findViewById("panel:button3");
|
var button3:ButtonView = v.findViewById("panel:button3");
|
||||||
|
|||||||
10
project.xml
Normal file
10
project.xml
Normal 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>
|
||||||
Reference in New Issue
Block a user