MainUISkin.exml
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="edwin.MainUISkin" xmlns:e="http://ns.egret.com/eui">
<e:Rect fillColor="0x000000" width="100%" height="100%" />
<e:Group horizontalCenter="0" verticalCenter="0">
<e:Panel id="panel" title="test" />
</e:Group>
</e:Skin>
MainUI.tsnamespace edwin {
export class MainUI extends eui.Component {
private panel: eui.Panel;
protected createChildren(): void {
super.createChildren();
this.percentWidth = this.percentHeight = 100;
this.panel.addEventListener(eui.UIEvent.CLOSING, this.onUIEventHandler, this);
this.panel.addEventListener(eui.UIEvent.MOVE, this.onUIEventHandler, this);
}
private onUIEventHandler(e: eui.UIEvent): void {
egret.log("eui.UIEvent:", e.type);
}
}
}
沒有留言:
張貼留言