This commit is contained in:
2025-10-10 16:09:14 +08:00
parent 561b3c5eee
commit df9ca6bfaa
66 changed files with 7433 additions and 7779 deletions
+1 -11
View File
@@ -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);