update_blur
This commit is contained in:
@@ -166,34 +166,33 @@ export class GirlDetailPanel extends li_BaseView {
|
||||
// 也立即尝试调整(以防已经加载完成)
|
||||
this.adjustVideoScale();
|
||||
this.vids = dataDetail.commercialVideos.slice(0);
|
||||
const paths = dataDetail.commercialImages.map((a) => a.path);
|
||||
this.refreshImgs(paths, true);
|
||||
this.refreshImgs(dataDetail.commercialImages);
|
||||
}
|
||||
|
||||
vids: purchase.CommercialVideo[];
|
||||
bindImgToggle() {
|
||||
const dataDetail = ConfigManager.tables.TbGirlsDetail.get(this.id);
|
||||
const paths = dataDetail.commercialImages.map((a) => a.path);
|
||||
const images = dataDetail.commercialImages;
|
||||
|
||||
this.refreshImgs(paths, true);
|
||||
this.refreshImgs(images);
|
||||
}
|
||||
|
||||
bindVideoToggle() {
|
||||
const paths = this.vids.map((a) => a.path);
|
||||
|
||||
this.refreshImgs(paths, false);
|
||||
this.refreshImgs(this.vids);
|
||||
}
|
||||
|
||||
refreshImgs(paths: string[], isImg: boolean) {
|
||||
refreshImgs(
|
||||
resouces: purchase.CommercialImage[] | purchase.CommercialVideo[]
|
||||
) {
|
||||
for (let i = this.imgsLayout.children.length - 1; i >= 0; i--) {
|
||||
this.imgsLayout.children[i].destroy();
|
||||
}
|
||||
|
||||
for (let i = 1; i < paths.length; i++) {
|
||||
const path = paths[i];
|
||||
for (let i = 1; i < resouces.length; i++) {
|
||||
const resource = resouces[i];
|
||||
let newNode = instantiate(this.imgItemInst.node);
|
||||
let item = newNode.getComponent(DetailImageItem);
|
||||
item.refresh(path, this, isImg);
|
||||
item.refresh(resource, this);
|
||||
newNode.active = true;
|
||||
this.imgsLayout.addChild(newNode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user