[macro] TemplateMacro: move init to constructor
This commit is contained in:
@@ -17,7 +17,8 @@ import haxework.view.group.VGroupView;
|
||||
@:view var switcher:FrameSwitcher;
|
||||
@:view var tabs:ButtonGroup<String>;
|
||||
|
||||
private function init():Void {
|
||||
public function new():Void {
|
||||
super();
|
||||
switcher.change("list");
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,6 @@ import haxework.view.SpriteView;
|
||||
|
||||
public function new() {
|
||||
super("test_layout");
|
||||
}
|
||||
|
||||
public function init():Void {
|
||||
resize();
|
||||
content.addEventListener(MouseEvent.CLICK, function(_) {
|
||||
resize();
|
||||
|
||||
@@ -23,7 +23,8 @@ class FontLabelView extends LabelListItem<ThemeFont> {
|
||||
|
||||
@:view var fonts:ListView<ThemeFont>;
|
||||
|
||||
private function init():Void {
|
||||
private function new():Void {
|
||||
super();
|
||||
var values:Array<ThemeFont> = Font.enumerateFonts(true).map(function(font:Font) {
|
||||
return {
|
||||
name: font.fontName,
|
||||
|
||||
Reference in New Issue
Block a user