继续补充UI细节

This commit is contained in:
2025-05-21 11:08:50 +08:00
parent 2e384f43e4
commit 594a295b5a
26 changed files with 251 additions and 85 deletions

View File

@@ -1,3 +0,0 @@
{
"uuid": "fb5508ba-9b4a-43b3-903e-1063df3deeb8"
}

View File

@@ -18,6 +18,10 @@ export const respath = {
dc_top_bg_day_finish: "atlas/images/img_dc_bg2.png",
dc_top_bg_month_finish: "atlas/images/img_dc_finished.png",
trophy_bg_light_gold: "atlas/trophys/img_trophy_bg_light_gold.png",
trophy_bg_light_grey: "atlas/trophys/img_trophy_bg_light_gray.png",
trophy_01: "atlas/trophys/trophy_01.png",
trophy_02: "atlas/trophys/trophy_02.png",
trophy_03: "atlas/trophys/trophy_03.png",

View File

@@ -18,10 +18,10 @@ export class DailyChallenge extends Laya.Script {
public btn_trophy: Laya.Image
@property(Laya.Image)
public icon_trophy: Laya.Image
@property(Laya.Image)
public btn_left: Laya.Image
@property(Laya.Image)
public btn_right: Laya.Image
@property(Laya.Box)
public btn_left: Laya.Box
@property(Laya.Box)
public btn_right: Laya.Box
@property(Laya.Image)
public bg_dc: Laya.Image;

View File

@@ -1,4 +1,5 @@
import { config } from "../constants/config";
import { respath } from "../constants/respath";
import { StorageManager } from "../models/StorageManager";
const { regClass, property } = Laya;
@@ -7,6 +8,8 @@ const { regClass, property } = Laya;
export class TrophyUnit extends Laya.Script {
declare owner : Laya.Box;
@property(Laya.Image)
public bg_light: Laya.Image;
@property(Laya.Image)
public icon: Laya.Image;
@property(Laya.Label)
@@ -21,10 +24,12 @@ export class TrophyUnit extends Laya.Script {
this.label_count.text = `${starCount}/${info.dayCount}`
this.label_month.text = config.MONTH_ABBRS[info.month-1]
if (starCount >= info.dayCount) {
this.bg_light.skin = respath.trophy_bg_light_gold
this.icon.gray = false
this.label_month.color = "#2d3138"
}
else {
this.bg_light.skin = respath.trophy_bg_light_grey
this.icon.gray = true
this.label_month.color = "#a7abb3"
}