优化横屏适配

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

View File

@@ -151,7 +151,7 @@ export class TopBar extends Laya.Script {
})
const sprite = this.item_sprites.get(difficulty)
sprite.graphics.clear()
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb", "#1d5cdc", 5)
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb", "#1d5cdc", 3)
this.item_labels.forEach((label: Laya.Label) => {
label.color = "#0e2a53"