fix:界面拉伸适配. add:支持cocos animation,spine,dragonbones等文件导入.

This commit is contained in:
YipLee
2021-01-22 00:02:49 +08:00
parent c4f716c8e9
commit c232a91a41
23 changed files with 2590 additions and 2028 deletions

View File

@@ -1,4 +1,6 @@
import Setting from "../../editor/Setting";
import Events, { EventName } from "../util/Events";
import Tool from "../util/Tool";
const { ccclass, property } = cc._decorator;
@@ -36,7 +38,7 @@ export default class ResizeArea extends cc.Component {
this.Target.updateAlignment();
Events.emit(EventName.RESIZE, this.Target.node);
this.updateWidget(this.Target.node);
Setting.save();
}
private onTouchStart(event: cc.Event.EventTouch) {
@@ -61,12 +63,4 @@ export default class ResizeArea extends cc.Component {
private onMouseLeave(event: cc.Event.EventMouse) {
this._canvas.style.cursor = 'default ';
}
private updateWidget(node: cc.Node) {
node.children.forEach((c) => {
let widget = c.getComponent(cc.Widget);
widget && widget.updateAlignment();
this.updateWidget(c);
});
}
}