调整UI细节

This commit is contained in:
2025-05-20 20:17:47 +08:00
parent e1671a6b68
commit 7b519c2424
10 changed files with 1623 additions and 1622 deletions

View File

@@ -19,11 +19,11 @@ export class Difficulty extends Laya.Script {
bg.graphics.clear()
bg.graphics.drawRoundRect(0, 0, offset.width, offset.height, 20, 20, 0, 0, "#f5f7fb")
Laya.Tween.to(offset, {y: 560}, 500)
Laya.Tween.to(offset, {y: 705}, 500)
var mask = this.owner.getChildByName("mask")
mask.on(Laya.Event.CLICK, this, ()=>{
Laya.Tween.to(offset, {y: 3000}, 500, null, Laya.Handler.create(this, () => {
Laya.Tween.to(offset, {y: 2400}, 500, null, Laya.Handler.create(this, () => {
this.owner.destroy()
}))
})

View File

@@ -17,6 +17,8 @@ export class Home extends Laya.Script {
public bg_dc: Laya.Image;
@property(Laya.Label)
public label_dc_title: Laya.Label;
@property(Laya.Label)
public label_dc_date: Laya.Label;
@property(Laya.Sprite)
public btn_play: Laya.Sprite;
@property(Laya.Sprite)
@@ -43,11 +45,18 @@ export class Home extends Laya.Script {
var dayNow = new Date().getDate()
var stageID = `${year}-${month}-${dayNow}`
if (user.get_doneCountBydate(year, month) >= 31)
if (user.get_doneCountBydate(year, month) >= 31) {
this.bg_dc.skin = respath.home_top_dc_bg_finish
else
this.label_dc_title.color = "#ffffff"
this.label_dc_date.color = "#ffffff"
}
else {
this.bg_dc.skin = respath.home_top_dc_bg_normal
this.label_dc_title.text = `${config.MONTH_ABBRS[month-1]} ${dayNow}`
this.label_dc_title.color = "#2d3138"
this.label_dc_date.color = "#2d3138"
}
this.label_dc_date.text = `${config.MONTH_ABBRS[month-1]} ${dayNow}`
var progress = user.get_done(stageID)
if (progress <= 0) {

View File

@@ -46,6 +46,7 @@ export class Stage extends Laya.Script {
public btn_note: Laya.Button;
private btn_note_normal: Laya.Box
private btn_note_checked: Laya.Box
private label_note: Laya.Label
@property(Laya.Button)
public btn_hint: Laya.Button;
private btn_hint_normal: Laya.Box
@@ -100,6 +101,7 @@ export class Stage extends Laya.Script {
this.btn_note.on(Laya.Event.CLICK, this, this.onClickNote)
this.btn_note_normal = this.btn_note.getChildByName("normal") as Laya.Box
this.btn_note_checked = this.btn_note.getChildByName("checked") as Laya.Box
this.label_note = this.btn_note.getChildByName("label") as Laya.Label
this.btn_hint.on(Laya.Event.CLICK, this, this.onClickHint)
this.btn_hint_normal = this.btn_hint.getChildByName("Image").getChildByName("normal") as Laya.Box
this.btn_hint_ad = this.btn_hint.getChildByName("Image").getChildByName("ad") as Laya.Box
@@ -264,6 +266,7 @@ export class Stage extends Laya.Script {
}
this.btn_note_normal.visible = this.data.get_note_open() == false
this.btn_note_checked.visible = this.data.get_note_open()
this.label_note.color = this.data.get_note_open() ? "#1d5cdc" : "#545962"
for (var i=0; i<this.candys.length; i++) {
this.candys[i].setNoteStatus(this.data.get_note_open())
}