优化横屏适配

This commit is contained in:
2025-06-05 17:58:10 +08:00
parent ee54b50bb5
commit 4b926ac64c
15 changed files with 1008 additions and 924 deletions

View File

@@ -51,16 +51,10 @@ export class UIManager extends Laya.Script {
private UIRoot: Laya.Panel
public getUIRoot(): Laya.Node {
if (config.H_SCREEN) {
if (!this.UIRoot) {
this.UIRoot = this.owner.getChildByName("UIRoot") as Laya.Panel
this.UIRoot.width = config.DESIGN_HEIGHT
this.UIRoot.height = config.DESIGN_WIDTH
}
return this.UIRoot
} else {
return this.owner
if (!this.UIRoot) {
this.UIRoot = this.owner.getChildByName("UIRoot") as Laya.Panel
}
return this.UIRoot
}
private topbar: TopBar