4matting
This commit is contained in:
parent
17b1273c6e
commit
e4552b8213
23
src/Main.hx
23
src/Main.hx
@ -1,11 +1,7 @@
|
||||
|
||||
|
||||
@:uiComp("view")
|
||||
// Naming scheme of component classes can be customized with domkit.Macros.registerComponentsPath();
|
||||
class ViewComp extends h2d.Flow implements h2d.domkit.Object {
|
||||
|
||||
static var SRC =
|
||||
<view class="mybox" min-width="200" content-halign={align}>
|
||||
static var SRC = <view class="mybox" min-width="200" content-halign={align}>
|
||||
<text text={"Rewild"}/>
|
||||
for( i in icons )
|
||||
<bitmap src={i} id="icons[]"/>
|
||||
@ -15,19 +11,19 @@ class ViewComp extends h2d.Flow implements h2d.domkit.Object {
|
||||
super(parent);
|
||||
initComponent();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@:uiComp("button")
|
||||
class ButtonComp extends h2d.Flow implements h2d.domkit.Object {
|
||||
|
||||
static var SRC = <button>
|
||||
<text public id="labelTxt" />
|
||||
</button>
|
||||
|
||||
public var label(get, set):String;
|
||||
function get_label() return labelTxt.text;
|
||||
|
||||
function get_label()
|
||||
return labelTxt.text;
|
||||
|
||||
function set_label(s) {
|
||||
labelTxt.text = s;
|
||||
return s;
|
||||
@ -52,13 +48,11 @@ class ButtonComp extends h2d.Flow implements h2d.domkit.Object {
|
||||
};
|
||||
}
|
||||
|
||||
public dynamic function onClick() {
|
||||
}
|
||||
public dynamic function onClick() {}
|
||||
}
|
||||
|
||||
@:uiComp("container")
|
||||
class ContainerComp extends h2d.Flow implements h2d.domkit.Object {
|
||||
|
||||
static var SRC = <container>
|
||||
<view(align,[]) id="view"/>
|
||||
<button public id="btn"/>
|
||||
@ -70,13 +64,10 @@ class ContainerComp extends h2d.Flow implements h2d.domkit.Object {
|
||||
super(parent);
|
||||
initComponent();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// PARAM=-lib domkit
|
||||
class Main extends hxd.App {
|
||||
|
||||
var center:h2d.Flow;
|
||||
var style = null;
|
||||
|
||||
@ -122,6 +113,4 @@ class Main extends hxd.App {
|
||||
#end
|
||||
new Main();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user