topbar hover 效果
This commit is contained in:
@@ -148,10 +148,12 @@ export class TopBar extends Laya.Script {
|
|||||||
this.item_sprites.forEach((sprite: Laya.Sprite) => {
|
this.item_sprites.forEach((sprite: Laya.Sprite) => {
|
||||||
sprite.graphics.clear()
|
sprite.graphics.clear()
|
||||||
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb")
|
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb")
|
||||||
|
sprite.alpha = 1
|
||||||
})
|
})
|
||||||
const sprite = this.item_sprites.get(difficulty)
|
const sprite = this.item_sprites.get(difficulty)
|
||||||
sprite.graphics.clear()
|
sprite.graphics.clear()
|
||||||
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb", "#1d5cdc", 3)
|
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb", "#1d5cdc", 3)
|
||||||
|
sprite.alpha = 1
|
||||||
|
|
||||||
this.item_labels.forEach((label: Laya.Label) => {
|
this.item_labels.forEach((label: Laya.Label) => {
|
||||||
label.color = "#0e2a53"
|
label.color = "#0e2a53"
|
||||||
@@ -169,6 +171,7 @@ export class TopBar extends Laya.Script {
|
|||||||
const sprite = Box.getChildByName("Sprite") as Laya.Sprite
|
const sprite = Box.getChildByName("Sprite") as Laya.Sprite
|
||||||
sprite.graphics.clear()
|
sprite.graphics.clear()
|
||||||
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#0e2a53")
|
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#0e2a53")
|
||||||
|
sprite.alpha = 0.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,6 +184,7 @@ export class TopBar extends Laya.Script {
|
|||||||
const sprite = Box.getChildByName("Sprite") as Laya.Sprite
|
const sprite = Box.getChildByName("Sprite") as Laya.Sprite
|
||||||
sprite.graphics.clear()
|
sprite.graphics.clear()
|
||||||
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb")
|
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb")
|
||||||
|
sprite.alpha = 0.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user