竖屏UI适配
This commit is contained in:
@@ -50,17 +50,16 @@ export class UIManager extends Laya.Script {
|
||||
|
||||
private UIRoot: Laya.Panel
|
||||
public getUIRoot(): Laya.Node {
|
||||
if (!this.UIRoot) {
|
||||
this.UIRoot = this.owner.getChildByName("UIRoot") as Laya.Panel
|
||||
if (config.H_SCREEN) {
|
||||
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
|
||||
} else {
|
||||
this.UIRoot.width = config.DESIGN_WIDTH
|
||||
this.UIRoot.height = config.DESIGN_HEIGHT
|
||||
}
|
||||
return this.UIRoot
|
||||
} else {
|
||||
return this.owner
|
||||
}
|
||||
return this.UIRoot
|
||||
}
|
||||
|
||||
private topbar: TopBar
|
||||
|
||||
Reference in New Issue
Block a user