update
This commit is contained in:
@@ -16,18 +16,11 @@ const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("ThemeItem")
|
||||
export class ThemeItem extends Component {
|
||||
@property(Sprite)
|
||||
lockImg: Sprite;
|
||||
@property(Sprite)
|
||||
lockCover: Sprite;
|
||||
@property(Label)
|
||||
titleName: Label;
|
||||
@property(UITransform)
|
||||
titleNameBg: UITransform;
|
||||
|
||||
@property(Node)
|
||||
loading: Node;
|
||||
|
||||
@property(Sprite)
|
||||
img: Sprite;
|
||||
|
||||
@@ -64,12 +57,10 @@ export class ThemeItem extends Component {
|
||||
}
|
||||
|
||||
refresh(themeId: number, parentPanel?: Node) {
|
||||
if (this.loading) this.loading.active = true;
|
||||
this.baseNode = parentPanel;
|
||||
// 主题数据
|
||||
const themeData = DataManager.I.getDataById<ThemeData>(DataId.Theme);
|
||||
this.lockImg.node.active = this.lockCover.node.active =
|
||||
!themeData.getIsReleaseById(themeId);
|
||||
|
||||
this.isLocked = !themeData.getIsReleaseById(themeId);
|
||||
this.key = themeData.getLanKeyById(themeId);
|
||||
this.updateTitle();
|
||||
@@ -81,7 +72,6 @@ export class ThemeItem extends Component {
|
||||
() => {
|
||||
let sizeTran = this.img.node.parent.getComponent(UITransform);
|
||||
Utils.adjustBgPixelRatioToSize(sizeTran.contentSize, this.img.node, 3);
|
||||
if (this.loading) this.loading.active = false;
|
||||
}
|
||||
);
|
||||
GButton.RemoveAndBandClick(this.node, this.OnClickThis, this);
|
||||
|
||||
Reference in New Issue
Block a user