|
@@ -1,10 +1,28 @@
|
|
|
-class View extends h2d.Flow implements h2d.domkit.Object {
|
|
|
+
|
|
|
+
|
|
|
+@:uiComp("view")
|
|
|
+class ViewComp extends h2d.Flow implements h2d.domkit.Object {
|
|
|
|
|
|
static var SRC =
|
|
|
<flow class="mybox" min-width="200" content-halign={align}>
|
|
|
Hello World
|
|
|
+ ${
|
|
|
+ for( i in icons )
|
|
|
+ <bitmap src={i} name="icons[]"/>
|
|
|
+ }
|
|
|
</flow>;
|
|
|
|
|
|
+ public function new(align,icons:Array<h2d.Tile>,?parent) {
|
|
|
+ super(parent);
|
|
|
+ initComponent();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+class ViewContainer extends h2d.Flow implements h2d.domkit.Object {
|
|
|
+
|
|
|
+ static var SRC = <flow><view(align,[]) name="view"/></flow>;
|
|
|
+
|
|
|
public function new(align,?parent) {
|
|
|
super(parent);
|
|
|
initComponent();
|
|
@@ -12,6 +30,7 @@ class View extends h2d.Flow implements h2d.domkit.Object {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//PARAM=-lib domkit
|
|
|
class Domkit extends hxd.App {
|
|
|
|
|
@@ -21,7 +40,7 @@ class Domkit extends hxd.App {
|
|
|
center = new h2d.Flow(s2d);
|
|
|
center.horizontalAlign = center.verticalAlign = Middle;
|
|
|
onResize();
|
|
|
- var view = new View(Right, center);
|
|
|
+ var view = new ViewContainer(Right, center);
|
|
|
|
|
|
var style = new h2d.domkit.Style();
|
|
|
style.load(hxd.Res.style);
|