头像入版 页面跳转优化
This commit is contained in:
@@ -2,7 +2,7 @@ import { _decorator, Component, Label, Node, Sprite, UITransform } from "cc";
|
||||
import { GButton } from "db://assets/Scripts/Main/Common/GButton";
|
||||
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
|
||||
import Utils from "db://assets/Scripts/Main/Common/Utils";
|
||||
import { NavigationManager } from "../manager/NavigationManager";
|
||||
import { NavigationManager, PageTransitionType } from "../manager/NavigationManager";
|
||||
import LanguageUtils from "../../Main/Common/LanguageUtils";
|
||||
import { InnerMsgCode } from "../../Main/Config/InnerMsgCode";
|
||||
import { DataManager, DataId } from "../data/DataManager";
|
||||
@@ -29,6 +29,8 @@ export class ThemeItem extends Component {
|
||||
|
||||
private isLocked: boolean;
|
||||
|
||||
private parentPanel: any;
|
||||
|
||||
key: string;
|
||||
protected onLoad(): void {
|
||||
Utils.addInnerEL(InnerMsgCode.LanguageChange, this, () => {
|
||||
@@ -41,8 +43,9 @@ export class ThemeItem extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
refresh(themeId: number) {
|
||||
refresh(themeId: number, parentPanel?: any) {
|
||||
this.loading.active = true;
|
||||
this.parentPanel = parentPanel;
|
||||
// 主题数据
|
||||
const themeData = DataManager.I.getDataById<ThemeData>(DataId.Theme);
|
||||
this.lockImg.node.active = this.lockCover.node.active =
|
||||
@@ -70,6 +73,9 @@ export class ThemeItem extends Component {
|
||||
if (this.isLocked) {
|
||||
return;
|
||||
}
|
||||
NavigationManager.Instance.navigateToGirlList(this.category);
|
||||
|
||||
// 使用预设的过渡动画配置
|
||||
const transitionConfig = NavigationManager.getTransitionPresets().SLIDE_LEFT_TO_RIGHT;
|
||||
NavigationManager.Instance.navigateToGirlList(this.category, transitionConfig, this.parentPanel);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user