import { _decorator, Component, math, Node, Sprite } from "cc"; import { Config18x } from "db://assets/Scripts/Main/Config/Config18x"; 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 "./GirlDetailPanel"; const { ccclass, property } = _decorator; @ccclass("DetailImageItem") export class DetailImageItem extends Component { @property(Sprite) img: Sprite; @property(Node) lock: Node; @property(Node) question: Node; base: GirlDetailPanel; url: string; onLoad() { GButton.BandClick(this.node, this.onClickThis, this); } onClickThis() { let data = { url: this.url, closeFunc: () => { this.base.setVideEnable(true); }, }; if (this.url) { ViewManager.I.openBundlesView("ShowPanel", data); this.base.setVideEnable(false); } } refresh(path: string, base: GirlDetailPanel) { this.base = base; this.lock.active = false; this.question.active = false; if (true) { this.url = path; // if (info.imageState !== ImageState.Release) { // this.url += '_blured'; // if (info.imageState === ImageState.Lock) // this.img.color = new math.Color(127, 127, 127, 255); // else // this.img.color = new math.Color(50, 50, 50, 255); // } else { // this.img.color = new math.Color(255, 255, 255, 255); // } ResManager.I.changeBundleSpriteFrame(this.img, this.url, "Chat18x"); } } }