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oot":"/","sourcesContent":["import { AudioSettings } from \"simba-cc-audio-manager\";\nimport { SDK } from \"simba-sdk\";\nimport { PageIndex } from \"../../../../avg/EditorEnums\";\nimport { Presenter } from \"../../../../common/classbase/PresenterBase\";\nimport { GameTextData } from \"../../../../common/gameplay/gamedata/GameTextData\";\nimport { UIManager } from \"../../../../common/gameplay/managers/UIManager\";\nimport GameDotMgr from \"../../../GameDotMgr\";\nimport { GameModelManager } from \"../../../model/GameModelManager\";\nimport { RegPresenter } from \"../../PresenterCCViewFactory\";\nimport { DiscoverSettingView, DiscoverSettingViewType } from \"../../view/type/discover/DiscoverSettingView\";\nimport { SourceView } from \"../../view/type/notice/NewNoticeView\";\nimport ExchangeCodeViewPresenter from \"../ExchangeCodeViewPresenter\";\nimport NewNoticeViewPresenter from \"../notice/NewNoticeViewPresenter\";\n\n@RegPresenter(DiscoverSettingViewType)\nexport class DiscoverSettingViewPresenter extends Presenter<undefined, DiscoverSettingView> {\n static uuid = \"DiscoverSettingViewPresenter\";\n\n onOpen() {\n super.onOpen(undefined);\n this.view.setProps({\n soundEnabled: AudioSettings.soundVolume > 0,\n musicEnabled: AudioSettings.musicVolume > 0,\n onToggleSound: this.toggleSound,\n onToggleMusic: this.toggleMusic,\n onToggleNotice: this.toggleNotice,\n onToggleExchangeCode: this.toggleExchangeCode\n });\n this._disposable.add(GameModelManager.CloseSettingView.on(this.onCloseSettingView));\n }\n\n toggleSound = () => {\n AudioSettings.soundVolume = AudioSettings.soundVolume > 0 ? 0 : 1;\n this.view.updateProps({\n soundEnabled: AudioSettings.soundVolume > 0\n });\n }\n\n toggleMusic = () => {\n AudioSettings.musicVolume = AudioSettings.musicVolume > 0 ? 0 : 1;\n this.view.updateProps({\n musicEnabled: AudioSettings.musicVolume > 0\n });\n }\n\n toggleNotice = () => {//公告\n UIManager.pushPresenter(NewNoticeViewPresenter, SourceView.SettingView);\n }\n\n toggleExchangeCode = () => {//兑换码 \n //点击兑换码打点\n GameDotMgr.getInstance().dotClickUI(\"exchange_code\");\n let title = GameModelManager.getLanguageTxt(GameTextData.TEXT_EXCHANGETITLE_VALUE);\n let content = \"\";\n UIManager.pushPresenter(ExchangeCodeViewPresenter, {\n titletxt: title,\n contenttxt: content\n });\n }\n\n onClose() {\n super.onClose();\n UIManager.popToPresenter(this);\n SDK.showGameClubButton();\n }\n\n onCloseSettingView = (index: PageIndex) => {\n this.view.close(true);\n GameModelManager.JumpToViewInGame.emit(index);\n }\n}"]}