39 lines
898 B
Haxe
Executable File
39 lines
898 B
Haxe
Executable File
package;
|
|
|
|
import haxework.gui.View;
|
|
import haxework.gui.VGroupView;
|
|
import haxework.gui.ButtonView;
|
|
import haxework.gui.Root;
|
|
|
|
|
|
@:template2("form.json")
|
|
class FormView extends VGroupView {
|
|
@:view public var panel(default, null):View;
|
|
@:view public var button1(default, null):View;
|
|
@:view public var button2(default, null):View;
|
|
@:view public var button3(default, null):View;
|
|
|
|
private function init() {
|
|
trace('Init');
|
|
}
|
|
}
|
|
|
|
class ViewExample {
|
|
|
|
public static function main() {
|
|
new ViewExample();
|
|
}
|
|
|
|
public function new() {
|
|
var form:FormView = new FormView();
|
|
Root.bind(form);
|
|
trace(form.panel);
|
|
trace(form.button1);
|
|
trace(form.button2);
|
|
trace(form.button3);
|
|
}
|
|
|
|
public function onPress(view:ButtonView):Void {
|
|
trace("onPress: " + view.id);
|
|
}
|
|
} |