update
This commit is contained in:
@@ -37,6 +37,9 @@ export class DetailImageItem extends Component {
|
||||
@property(Label)
|
||||
videoPrice: Label;
|
||||
|
||||
@property(Node)
|
||||
loading: Node;
|
||||
|
||||
base: GirlDetailPanel;
|
||||
url: string;
|
||||
isImage: boolean;
|
||||
@@ -146,6 +149,8 @@ export class DetailImageItem extends Component {
|
||||
|
||||
this.test_resID = this.node.getChildByName("resID");
|
||||
|
||||
this.loading.active = true;
|
||||
|
||||
this.test_resID.getComponent(Label).string =
|
||||
this.girlId.toString() + this.resId;
|
||||
|
||||
@@ -211,6 +216,7 @@ export class DetailImageItem extends Component {
|
||||
ResManager.I.changeBundleSpriteFrame(this.img, imgPath, "Girls", () => {
|
||||
this.question.active = false; // 图片加载成功后隐藏问号
|
||||
this.scaleToFillItem();
|
||||
this.loading.active = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@ export class GirlListItem extends Component {
|
||||
@property(Node)
|
||||
chatIcon: Node;
|
||||
|
||||
@property(Node)
|
||||
loading: Node;
|
||||
|
||||
@property(Node)
|
||||
starParent: Node;
|
||||
|
||||
@@ -137,7 +140,7 @@ export class GirlListItem extends Component {
|
||||
this.category.toString(),
|
||||
this.id
|
||||
);
|
||||
|
||||
this.loading.active = true;
|
||||
//listAvatarPath = listAvatarPath.replace("Avatar", "avatar"); //临时
|
||||
ResManager.I.changeBundleSpriteFrame(
|
||||
this.avatar,
|
||||
@@ -150,6 +153,7 @@ export class GirlListItem extends Component {
|
||||
this.avatar.node,
|
||||
2
|
||||
);
|
||||
this.loading.active = false;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { _decorator, Animation, Component, Node } from "cc";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("LoadingItem")
|
||||
export class LoadingItem extends Component {
|
||||
@property(Animation)
|
||||
animation: Animation;
|
||||
protected onEnable(): void {
|
||||
if (this.animation) {
|
||||
this.animation.play();
|
||||
}
|
||||
}
|
||||
|
||||
protected onDisable(): void {
|
||||
if (this.animation) {
|
||||
this.animation.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "38c1255e-0b9d-4c11-aae0-ebc28d580222",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -19,6 +19,9 @@ export class ThemeItem extends Component {
|
||||
@property(Label)
|
||||
titleName: Label;
|
||||
|
||||
@property(Node)
|
||||
loading: Node;
|
||||
|
||||
@property(Sprite)
|
||||
img: Sprite;
|
||||
|
||||
@@ -39,13 +42,16 @@ export class ThemeItem extends Component {
|
||||
}
|
||||
|
||||
refresh(themeId: number) {
|
||||
this.loading.active = true;
|
||||
// 主题数据
|
||||
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.titleName.string = LanguageUtils.getText(themeData.getLanKeyById(themeId));
|
||||
this.titleName.string = LanguageUtils.getText(
|
||||
themeData.getLanKeyById(themeId)
|
||||
);
|
||||
this.category = themeData.getCategoryById(themeId);
|
||||
ResManager.I.changeBundleSpriteFrame(
|
||||
this.img,
|
||||
@@ -54,6 +60,7 @@ export class ThemeItem extends Component {
|
||||
() => {
|
||||
let sizeTran = this.img.node.parent.getComponent(UITransform);
|
||||
Utils.adjustBgPixelRatioToSize(sizeTran.contentSize, this.img.node, 3);
|
||||
this.loading.active = false;
|
||||
}
|
||||
);
|
||||
GButton.RemoveAndBandClick(this.node, this.OnClickThis, this);
|
||||
|
||||
Reference in New Issue
Block a user