优化横屏适配
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user