This commit is contained in:
2025-09-21 14:28:17 +08:00
parent 11e8e516b7
commit d823fa9083
16 changed files with 635 additions and 701 deletions
@@ -17,6 +17,7 @@ import LanguageUtils, {
} from "../../../Main/Common/LanguageUtils";
import AudioManager from "../../../Main/Manager/AudioManager";
import PlayerDataManager from "../../../Main/Manager/PlayerDataManager";
import { NavigationManager } from "../../manager/NavigationManager";
const { ccclass, property } = _decorator;
interface LanguageButton {
@@ -58,8 +59,6 @@ export class SettingPanel extends li_BaseView {
this.currentSelectedLang = LanguageUtils.CurrentLanguage;
this.updateSelection();
this.updateAudioButtonStates();
this.playEnterAnimation();
}
private music_on: Node;
@@ -163,7 +162,7 @@ export class SettingPanel extends li_BaseView {
// GButton.BandClick(this._nodeTab.Language1, this.switchToEn, this);
// GButton.BandClick(this._nodeTab.Language2, this.swithcToHi, this);
GButton.BandClick(this._nodeTab.closeBtn, this.close, this);
GButton.BandClick(this._nodeTab.closeBtn, this.onClickClose, this);
this.languageButtons.forEach((langBtn) => {
if (langBtn.button) {
@@ -273,23 +272,7 @@ export class SettingPanel extends li_BaseView {
.start();
}
private playEnterAnimation() {
if (this.panelBg) {
this.panelBg.scale = new Vec3(0.8, 0.8, 1);
tween(this.panelBg)
.to(0.3, { scale: new Vec3(1, 1, 1) }, { easing: "backOut" })
.start();
}
}
private playExitAnimation(callback: () => void) {
if (this.panelBg) {
tween(this.panelBg)
.to(0.2, { scale: new Vec3(0.8, 0.8, 1) }, { easing: "backIn" })
.call(callback)
.start();
} else {
callback();
}
onClickClose() {
NavigationManager.Instance.closeSubPanel(this);
}
}