update_blur

This commit is contained in:
2025-08-29 16:23:59 +08:00
parent bf92949a43
commit 3c254811f5
181 changed files with 11821 additions and 18 deletions
@@ -4,6 +4,7 @@ import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
import { ViewManager } from "db://assets/Scripts/Main/Manager/ViewManager";
import { GButton } from "db://assets/Scripts/Main/Common/GButton";
import { GirlDetailPanel } from "../ui/panels/GirlDetailPanel";
import { purchase } from "../../schema/schema";
const { ccclass, property } = _decorator;
@@ -80,17 +81,28 @@ export class DetailImageItem extends Component {
);
}
}
refresh(path: string, base: GirlDetailPanel, isImage: boolean = true) {
refresh(
resource: purchase.CommercialImage | purchase.CommercialVideo,
base: GirlDetailPanel
) {
this.base = base;
this.lock.active = false;
this.question.active = true; // 显示问号,表示加载中
this.url = path;
this.url = resource.path;
let imgPath = this.url;
this.isImage = isImage;
if (!isImage) {
imgPath = this.url + "_thumbnail";
if (resource instanceof purchase.CommercialImage) {
this.isImage = true;
} else {
this.isImage = false;
if (resource.videoPrice > 0) {
imgPath = this.url + "_thumbnail_blur";
} else {
imgPath = this.url + "_thumbnail";
}
}
ResManager.I.changeBundleSpriteFrame(this.img, imgPath, "Chat18x", () => {
this.question.active = false; // 图片加载成功后隐藏问号
this.scaleToFillItem();