summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs1116
1 files changed, 1116 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs
new file mode 100644
index 00000000..2d284520
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs
@@ -0,0 +1,1116 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ScreenShotShareView : DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/Share";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ private XScreenShotShareDocument _doc = null;
+
+ private int _share_count = 0;
+
+ private uint _dance_timer_token = 0u;
+
+ private uint _check_pic_token = 0u;
+
+ private XFx _playing_fx = null;
+
+ private float _max_dist = 9f;
+
+ private float _min_dist = 3f;
+
+ private HashSet<uint> _check_index = new HashSet<uint>();
+
+ private List<GameObject> _mode_go = new List<GameObject>();
+
+ private List<GameObject> _mode_effectgo = new List<GameObject>();
+
+ private string _saved_file_path = "";
+
+ private int _dance_num = 0;
+
+ private XFx fx;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XScreenShotShareDocument>(XScreenShotShareDocument.uuID);
+ this._doc.ScreenShotView = this;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("CameraValue");
+ string[] array = value.Split(new char[]
+ {
+ '|'
+ });
+ this._min_dist = float.Parse(array[0]);
+ this._max_dist = float.Parse(array[1]);
+ this.fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_Share", base.uiBehaviour.mEffectParent, false);
+ this.InitLeftMenu();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.mQQBtn1.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQQShareSession));
+ base.uiBehaviour.mQQBtn2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQQShareQZone));
+ base.uiBehaviour.mWeChatBtn1.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWeChatShareSession));
+ base.uiBehaviour.mWeChatBtn2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWeChatShareTimeLine));
+ base.uiBehaviour.mClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ base.uiBehaviour.mDoScreenShot.RegisterClickEventHandler(new ButtonClickEventHandler(this.CaptureScreenShot));
+ base.uiBehaviour.mReqShareBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ReqShare));
+ base.uiBehaviour.mSnapShotAgain.RegisterClickEventHandler(new ButtonClickEventHandler(this.ReScreenShot));
+ base.uiBehaviour.mQQBackClick.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseShare));
+ base.uiBehaviour.mWeChatBackClick.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseShare));
+ base.uiBehaviour.mSnapRoot.RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnCharacterWindowDrag));
+ base.uiBehaviour.mReqSave.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSavePic));
+ base.uiBehaviour.mModeSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowMode));
+ base.uiBehaviour.mDanceSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowAnim));
+ base.uiBehaviour.mEffectsSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowFx));
+ base.uiBehaviour.mEffectsMore.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowMoreFx));
+ base.uiBehaviour.mUnlockBack.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnHideUnlock));
+ base.uiBehaviour.mZoomSlider.RegisterValueChangeEventHandler(new SliderValueChangeEventHandler(this.OnZoomSliderChanged));
+ base.uiBehaviour.mModeBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBg));
+ base.uiBehaviour.mDanceBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBg));
+ base.uiBehaviour.mEffectBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBg));
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ this.ShowCaptureFrame();
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ if (sceneType != SceneType.SCENE_FAMILYGARDEN)
+ {
+ if (sceneType != SceneType.SCENE_WEDDING)
+ {
+ if (sceneType == SceneType.SCENE_LEISURE)
+ {
+ bool flag = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler != null;
+ if (flag)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler.SetVisible(false);
+ }
+ }
+ }
+ else
+ {
+ bool flag2 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler != null;
+ if (flag2)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler.SetVisible(false);
+ }
+ }
+ }
+ else
+ {
+ bool flag3 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler != null;
+ if (flag3)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler.SetVisible(false);
+ }
+ }
+ this.OnReqEffect();
+ base.uiBehaviour.mDoScreenShot.SetAudioClip("Audio/UI/Cam_photo");
+ base.uiBehaviour.mZoomSlider.Value = (XSingleton<XScene>.singleton.GameCamera.TargetOffset - this._min_dist) / (this._max_dist - this._min_dist);
+ this.InitDance();
+ XSingleton<PDatabase>.singleton.shareCallbackType = ShareCallBackType.WeekShare;
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsLoaded() && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.StackRefresh();
+ }
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ if (sceneType != SceneType.SCENE_FAMILYGARDEN)
+ {
+ if (sceneType != SceneType.SCENE_WEDDING)
+ {
+ if (sceneType == SceneType.SCENE_LEISURE)
+ {
+ bool flag2 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler != null;
+ if (flag2)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler.SetVisible(true);
+ }
+ }
+ }
+ else
+ {
+ bool flag3 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler != null;
+ if (flag3)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler.SetVisible(true);
+ }
+ }
+ }
+ else
+ {
+ bool flag4 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler != null;
+ if (flag4)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler.SetVisible(true);
+ }
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._dance_timer_token);
+ this._dance_timer_token = 0u;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._check_pic_token);
+ this._check_pic_token = 0u;
+ this.OnResetEntityRender();
+ this.OnStopPlayingFX();
+ for (int i = 0; i < this._mode_go.Count; i++)
+ {
+ GameObject gameObject = this._mode_go[i];
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("option1/Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.bChecked = true;
+ }
+ for (int j = 0; j < this._mode_effectgo.Count; j++)
+ {
+ GameObject gameObject2 = this._mode_effectgo[j];
+ IXUICheckBox ixuicheckBox2 = gameObject2.transform.Find("Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox2.bChecked = false;
+ }
+ XSingleton<XScene>.singleton.GameCamera.TargetOffset = XSingleton<XScene>.singleton.GameCamera.DefaultOffset;
+ XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, false);
+ base.uiBehaviour.mCaptureTexture.SetRuntimeTex(null, true);
+ }
+
+ protected override void OnUnload()
+ {
+ bool flag = this.fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.fx, true);
+ this.fx = null;
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.mSnapShot);
+ }
+
+ public void ShowMainView()
+ {
+ base.uiBehaviour.mCharFrame.SetActive(false);
+ base.uiBehaviour.mUnlockFrame.SetVisible(false);
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+
+ public void ShowCharView()
+ {
+ base.uiBehaviour.mCharFrame.SetActive(true);
+ base.uiBehaviour.mUnlockFrame.SetVisible(false);
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.mSnapShot);
+ }
+
+ private void ShowCaptureFrame()
+ {
+ base.uiBehaviour.mCaptureTexture.SetRuntimeTex(null, true);
+ base.uiBehaviour.mDoScreenShot.SetVisible(true);
+ base.uiBehaviour.mKacha.SetVisible(false);
+ base.uiBehaviour.mShareFrame.SetActive(false);
+ base.uiBehaviour.mClose.SetVisible(true);
+ base.uiBehaviour.mScaleDoing.SetActive(true);
+ base.uiBehaviour.mLogo.SetActive(false);
+ XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, false);
+ base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 0f);
+ }
+
+ public void IOS3DTouchScreenShot()
+ {
+ base.uiBehaviour.mDoScreenShot.SetVisible(false);
+ base.uiBehaviour.mClose.SetVisible(false);
+ base.uiBehaviour.mScaleDoing.SetActive(false);
+ base.uiBehaviour.mModeSp.SetVisible(false);
+ base.uiBehaviour.mDanceSp.SetVisible(false);
+ base.uiBehaviour.mEffectsSp.SetVisible(false);
+ base.uiBehaviour.mZoom.SetActive(false);
+ base.uiBehaviour.mZoom.SetActive(true);
+ base.uiBehaviour.mLogo.SetActive(true);
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ base.uiBehaviour.mLogoQQ.SetActive(true);
+ base.uiBehaviour.mLogoWC.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.mLogoQQ.SetActive(false);
+ base.uiBehaviour.mLogoWC.SetActive(true);
+ }
+ base.uiBehaviour.mPlayerName.SetText(XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
+ base.uiBehaviour.mServerName.SetText(XSingleton<XClientNetwork>.singleton.Server);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(false);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(XSingleton<XScreenShotMgr>.singleton.CaptureScreenshot), null);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.2f, new XTimerMgr.ElapsedEventHandler(this.PlayScreenFx), null);
+ }
+
+ public bool CaptureScreenShot(IXUIButton btn)
+ {
+ base.uiBehaviour.mDoScreenShot.SetVisible(false);
+ base.uiBehaviour.mClose.SetVisible(false);
+ base.uiBehaviour.mScaleDoing.SetActive(false);
+ base.uiBehaviour.mModeSp.SetVisible(false);
+ base.uiBehaviour.mDanceSp.SetVisible(false);
+ base.uiBehaviour.mEffectsSp.SetVisible(false);
+ base.uiBehaviour.mZoom.SetActive(false);
+ base.uiBehaviour.mLogo.SetActive(true);
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ base.uiBehaviour.mLogoQQ.SetActive(true);
+ base.uiBehaviour.mLogoWC.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.mLogoQQ.SetActive(false);
+ base.uiBehaviour.mLogoWC.SetActive(true);
+ }
+ base.uiBehaviour.mPlayerName.SetText(XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
+ base.uiBehaviour.mServerName.SetText(XSingleton<XClientNetwork>.singleton.Server);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(false);
+ XSingleton<XScreenShotMgr>.singleton.CaptureScreenshot(null);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.2f, new XTimerMgr.ElapsedEventHandler(this.PlayScreenFx), null);
+ return true;
+ }
+
+ public bool ReqShare(IXUIButton btn)
+ {
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ bool flag2 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("QQ_Installed", "");
+ bool flag3 = !flag2;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_QQ_NOT_INSTALLED"), "fece00");
+ return false;
+ }
+ base.uiBehaviour.mQQFrame.SetVisible(true);
+ base.uiBehaviour.mWeChatFrame.SetVisible(false);
+ base.uiBehaviour.mQQPlayTween.SetTweenGroup(0);
+ base.uiBehaviour.mQQPlayTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.mQQPlayTween.PlayTween(true, -1f);
+ }
+ else
+ {
+ bool flag4 = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat;
+ if (flag4)
+ {
+ bool flag5 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("Weixin_Installed", "");
+ bool flag6 = !flag5;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_WECHAT_NOT_INSTALLED"), "fece00");
+ return false;
+ }
+ base.uiBehaviour.mQQFrame.SetVisible(false);
+ base.uiBehaviour.mWeChatFrame.SetVisible(true);
+ base.uiBehaviour.mWCPlayTween.SetTweenGroup(0);
+ base.uiBehaviour.mWCPlayTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.mWCPlayTween.PlayTween(true, -1f);
+ }
+ }
+ return true;
+ }
+
+ public bool ReScreenShot(IXUIButton btn)
+ {
+ this.ShowCaptureFrame();
+ return true;
+ }
+
+ private void PlayScreenFx(object obj)
+ {
+ base.uiBehaviour.mKacha.SetVisible(true);
+ base.uiBehaviour.mPlayTween.SetTweenGroup(0);
+ base.uiBehaviour.mPlayTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.mPlayTween.PlayTween(true, -1f);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.4f, new XTimerMgr.ElapsedEventHandler(this.ShowShare), null);
+ base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 1000f);
+ this._share_count = 0;
+ }
+
+ private void ShowShare(object obj)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = !File.Exists(XSingleton<XScreenShotMgr>.singleton.FilePath);
+ if (flag2)
+ {
+ base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 0f);
+ this._share_count++;
+ bool flag3 = this._share_count > 30;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip("Failed", "fece00");
+ }
+ else
+ {
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(this.ShowShare), null);
+ }
+ }
+ else
+ {
+ base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 1000f);
+ base.uiBehaviour.mShareFrame.SetActive(true);
+ base.uiBehaviour.mDoScreenShot.SetVisible(false);
+ base.uiBehaviour.mQQFrame.SetVisible(false);
+ base.uiBehaviour.mWeChatFrame.SetVisible(false);
+ base.uiBehaviour.mModeSp.SetVisible(true);
+ base.uiBehaviour.mDanceSp.SetVisible(true);
+ base.uiBehaviour.mEffectsSp.SetVisible(true);
+ base.uiBehaviour.mZoom.SetActive(true);
+ base.uiBehaviour.mLogo.SetActive(false);
+ bool visible = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Photo_Share);
+ base.uiBehaviour.mReqShareBtn.SetVisible(visible);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(true);
+ this.OnStopPlayingFX();
+ XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, true);
+ base.uiBehaviour.mPicFramePlayTween.SetTweenGroup(0);
+ base.uiBehaviour.mPicFramePlayTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.mPicFramePlayTween.PlayTween(true, -1f);
+ XSingleton<XDebug>.singleton.AddLog("The screen file path: ", XSingleton<XScreenShotMgr>.singleton.FilePath, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XDebug>.singleton.AddLog("File exist: ", File.Exists(XSingleton<XScreenShotMgr>.singleton.FilePath).ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ RuntimePlatform platform = Application.platform;
+ if ((int)platform != 8 && (int)platform != 11)
+ {
+ byte[] array = File.ReadAllBytes(XSingleton<XScreenShotMgr>.singleton.FilePath);
+ bool flag4 = array != null;
+ if (flag4)
+ {
+ Texture2D texture2D = new Texture2D(2, 2);
+ texture2D.LoadImage(array);
+ base.uiBehaviour.mCaptureTexture.SetRuntimeTex(texture2D, true);
+ }
+ }
+ else
+ {
+ byte[] array2 = File.ReadAllBytes(XSingleton<XScreenShotMgr>.singleton.FilePath);
+ Texture2D texture2D2 = new Texture2D(2, 2);
+ bool flag5 = texture2D2.LoadImage(array2);
+ bool flag6 = flag5;
+ if (flag6)
+ {
+ base.uiBehaviour.mCaptureTexture.SetRuntimeTex(texture2D2, true);
+ int width = texture2D2.width;
+ int height = texture2D2.height;
+ bool flag7 = width <= 600;
+ if (flag7)
+ {
+ this.ShowCaptureFrame();
+ }
+ }
+ else
+ {
+ bool flag8 = !flag5;
+ if (flag8)
+ {
+ this.ShowCaptureFrame();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public bool OnQQShareSession(IXUIButton btn)
+ {
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
+ XSingleton<XScreenShotMgr>.singleton.ShareScreen(true);
+ return true;
+ }
+
+ public bool OnQQShareQZone(IXUIButton btn)
+ {
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
+ XSingleton<XScreenShotMgr>.singleton.ShareScreen(false);
+ return true;
+ }
+
+ public bool OnWeChatShareSession(IXUIButton btn)
+ {
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
+ XSingleton<XScreenShotMgr>.singleton.ShareScreen(true);
+ return true;
+ }
+
+ public bool OnWeChatShareTimeLine(IXUIButton btn)
+ {
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
+ XSingleton<XScreenShotMgr>.singleton.ShareScreen(false);
+ return true;
+ }
+
+ public bool OnClose(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void OnCloseShare(IXUISprite sp)
+ {
+ base.uiBehaviour.mQQFrame.SetVisible(false);
+ base.uiBehaviour.mWeChatFrame.SetVisible(false);
+ }
+
+ private bool OnDance(IXUIButton btn)
+ {
+ float num = XSingleton<X3DAvatarMgr>.singleton.SetMainAnimationGetLength(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.Dance);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._dance_timer_token);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("DanceLoopCount");
+ this._dance_timer_token = XSingleton<XTimerMgr>.singleton.SetTimer(num * (float)@int, new XTimerMgr.ElapsedEventHandler(this.OnFinishDance), null);
+ return true;
+ }
+
+ private void OnFinishDance(object obj)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.SetMainAnimation(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.Idle);
+ }
+
+ protected bool OnCharacterWindowDrag(Vector2 delta)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.RotateMain(-delta.x / 2f);
+ return true;
+ }
+
+ private void OnShowMode(IXUISprite sp)
+ {
+ bool flag = base.uiBehaviour.mModeSelect.IsVisible();
+ if (flag)
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(true);
+ }
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+
+ private void OnShowAnim(IXUISprite sp)
+ {
+ bool flag = this._dance_num == 0;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_NO_DANCE_ANIM"), "fece00");
+ }
+ else
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ bool flag2 = base.uiBehaviour.mDanceSelect.IsVisible();
+ if (flag2)
+ {
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mDanceSelect.SetVisible(true);
+ }
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+ }
+
+ private void OnShowFx(IXUISprite sp)
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ bool flag = base.uiBehaviour.mEffectsSelect.IsVisible();
+ if (flag)
+ {
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mEffectsSelect.SetVisible(true);
+ }
+ }
+
+ private void OnShowMoreFx(IXUISprite sp)
+ {
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ bool flag = base.uiBehaviour.mUnlockFrame.IsVisible();
+ if (!flag)
+ {
+ int num = this.OnShowMoreFxFrame();
+ bool flag2 = num > 0;
+ if (flag2)
+ {
+ base.uiBehaviour.mUnlockFrame.SetVisible(true);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_NO_MORE_EFFECTS"), "fece00");
+ }
+ }
+ }
+
+ private int OnShowMoreFxFrame()
+ {
+ this.OnStopPlayingFX();
+ base.uiBehaviour.mEffectListPool.ReturnAll(false);
+ uint num = 0u;
+ int num2 = 0;
+ for (int i = 0; i < this._doc.EffectAllListId.Count; i++)
+ {
+ bool flag = this._doc.EffectListId.Contains(this._doc.EffectAllListId[i]);
+ if (!flag)
+ {
+ bool flag2 = num == 0u;
+ if (flag2)
+ {
+ num = this._doc.EffectAllListId[i];
+ }
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById(this._doc.EffectAllListId[i]);
+ GameObject gameObject = base.uiBehaviour.mEffectListPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mEffectListPool.TplPos.x, base.uiBehaviour.mEffectListPool.TplPos.y - (float)(num2 * base.uiBehaviour.mEffectListPool.TplHeight), base.uiBehaviour.mEffectListPool.TplPos.z);
+ IXUILabel ixuilabel = gameObject.transform.Find("t").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowDataById[0].EffectName);
+ IXUILabel ixuilabel2 = gameObject.transform.Find("t2").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(rowDataById[0].EffectName);
+ IXUICheckBox ixuicheckBox = gameObject.transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSelectEffect));
+ ixuicheckBox.ID = (ulong)this._doc.EffectAllListId[i];
+ bool flag3 = num2 == 0;
+ if (flag3)
+ {
+ ixuicheckBox.bChecked = true;
+ this.OnSetEffect((int)this._doc.EffectAllListId[i]);
+ }
+ else
+ {
+ ixuicheckBox.bChecked = false;
+ }
+ num2++;
+ }
+ }
+ this.OnInitUnlockInfo(num);
+ return num2;
+ }
+
+ private void OnInitUnlockInfo(uint index)
+ {
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById(index);
+ base.uiBehaviour.mConditionPool.ReturnAll(false);
+ for (int i = 0; i < rowDataById.Count; i++)
+ {
+ bool flag = false;
+ GameObject gameObject = base.uiBehaviour.mConditionPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mConditionPool.TplPos.x, base.uiBehaviour.mConditionPool.TplPos.y - (float)(i * base.uiBehaviour.mConditionPool.TplHeight), base.uiBehaviour.mConditionPool.TplPos.z);
+ IXUILabel ixuilabel = gameObject.transform.Find("condition1").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = gameObject.transform.Find("ok").GetComponent("XUISprite") as IXUISprite;
+ uint num = rowDataById[i].Condition[0, 0];
+ uint num2 = rowDataById[i].Condition[0, 1];
+ switch (num)
+ {
+ case 1u:
+ {
+ bool flag2 = this._doc.CharmVal >= num2;
+ if (flag2)
+ {
+ flag = true;
+ }
+ break;
+ }
+ case 2u:
+ {
+ uint level = XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.Level;
+ bool flag3 = level >= num2;
+ if (flag3)
+ {
+ flag = true;
+ }
+ break;
+ }
+ case 3u:
+ {
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ bool flag4 = specificDocument.TotalPay >= num2;
+ if (flag4)
+ {
+ flag = true;
+ }
+ break;
+ }
+ case 4u:
+ {
+ XWelfareDocument specificDocument2 = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag5 = specificDocument2.IsOwnMemberPrivilege((MemberPrivilege)num2);
+ if (flag5)
+ {
+ flag = true;
+ }
+ break;
+ }
+ }
+ ixuilabel.SetText(rowDataById[i].ConditionDesc);
+ ixuilabel2.SetText(rowDataById[i].desc);
+ ixuilabel2.ID = (ulong)rowDataById[i].SystemID;
+ ixuilabel2.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnEnterSystemUnlock));
+ bool flag6 = flag;
+ if (flag6)
+ {
+ ixuisprite.SetVisible(true);
+ ixuilabel2.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel2.SetVisible(true);
+ }
+ }
+ }
+
+ private void OnStopPlayingFX()
+ {
+ bool flag = this._playing_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._playing_fx, true);
+ }
+ this._playing_fx = null;
+ }
+
+ private void OnEnterSystemUnlock(IXUILabel lb)
+ {
+ this.SetVisible(false, true);
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((XSysDefine)lb.ID, 0UL);
+ }
+
+ private void OnHideUnlock(IXUISprite sp)
+ {
+ base.uiBehaviour.mUnlockFrame.SetVisible(false);
+ this.OnStopPlayingFX();
+ }
+
+ public bool OnModeChanged(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ if (flag)
+ {
+ bool flag2 = this._check_index.Contains((uint)box.ID);
+ if (flag2)
+ {
+ this._check_index.Remove((uint)box.ID);
+ }
+ }
+ else
+ {
+ bool flag3 = !this._check_index.Contains((uint)box.ID);
+ if (flag3)
+ {
+ this._check_index.Add((uint)box.ID);
+ }
+ }
+ this.OnRefreshPlayerRender();
+ return true;
+ }
+
+ public bool OnAnimChanged(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XDanceDocument.Doc.ReqStartJustDance((uint)box.ID);
+ result = true;
+ }
+ return result;
+ }
+
+ public bool OnEffectChanged(IXUICheckBox box)
+ {
+ this.OnStopPlayingFX();
+ bool flag = !box.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ Transform transform = XSingleton<UIManager>.singleton.UIRoot.Find("Camera").transform;
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById((uint)box.ID);
+ this._playing_fx = XSingleton<XFxMgr>.singleton.CreateAndPlay(rowDataById[0].EffectRoute, transform, Vector3.zero, Vector3.one, 1f, true, 3600f, true);
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnSetEffect(int index)
+ {
+ this.OnInitUnlockInfo((uint)index);
+ this.OnStopPlayingFX();
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById((uint)index);
+ this._playing_fx = XSingleton<XFxMgr>.singleton.CreateUIFx(rowDataById[0].EffectRoute, base.uiBehaviour.mUnlockEffectWindow.transform, new Vector3(0.25f, 0.25f, 0.25f), false);
+ }
+
+ public bool OnSelectEffect(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.OnSetEffect((int)box.ID);
+ result = true;
+ }
+ return result;
+ }
+
+ public bool OnSavePic(IXUIButton btn)
+ {
+ bool flag = this._saved_file_path == XSingleton<XScreenShotMgr>.singleton.FilePath;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("CAMERA_SAVED_ERR"), "fece00");
+ result = false;
+ }
+ else
+ {
+ RuntimePlatform platform = Application.platform;
+ if ((int)platform != 8)
+ {
+ if ((int)platform == 11)
+ {
+ string text = "/../../../../DCIM/Camera";
+ text = Application.persistentDataPath + text;
+ bool flag2 = !Directory.Exists(text);
+ if (flag2)
+ {
+ Directory.CreateDirectory(text);
+ }
+ string destFileName = text + "/" + XSingleton<XScreenShotMgr>.singleton.FileName;
+ File.Copy(XSingleton<XScreenShotMgr>.singleton.FilePath, destFileName);
+ XSingleton<XScreenShotMgr>.singleton.RefreshPhotoView(text);
+ }
+ }
+ else
+ {
+ this._saved_file_path = XSingleton<XScreenShotMgr>.singleton.FilePath;
+ XSingleton<XScreenShotMgr>.singleton.SaveScreenshotPic(this._saved_file_path);
+ }
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("CAMERA_SAVED"), "fece00");
+ this._saved_file_path = XSingleton<XScreenShotMgr>.singleton.FilePath;
+ result = true;
+ }
+ return result;
+ }
+
+ public void OnAnimStart(IXUISprite sp)
+ {
+ }
+
+ public void OnClickBg(IXUISprite sp)
+ {
+ bool flag = sp.ID == 1UL;
+ if (flag)
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ }
+ else
+ {
+ bool flag2 = sp.ID == 2UL;
+ if (flag2)
+ {
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ }
+ else
+ {
+ bool flag3 = sp.ID == 3UL;
+ if (flag3)
+ {
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+ }
+ }
+ }
+
+ public bool OnZoomSliderChanged(float val)
+ {
+ XSingleton<XScene>.singleton.GameCamera.TargetOffset = this._min_dist + (this._max_dist - this._min_dist) * val;
+ return true;
+ }
+
+ public bool CanRenderOtherPalyers()
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ return flag || this._check_index.Contains(1u);
+ }
+
+ private void OnRefreshPlayerRender()
+ {
+ bool flag = this._check_index.Contains(0u);
+ bool flag2 = XSingleton<XEntityMgr>.singleton.Player != null;
+ if (flag2)
+ {
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XPlayer.PlayerLayer, flag);
+ XSingleton<XCustomShadowMgr>.singleton.SetCullLayer(flag);
+ XBillboardShowCtrlEventArgs @event = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ @event.show = flag;
+ @event.Firer = XSingleton<XEntityMgr>.singleton.Player;
+ @event.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ }
+ bool flag3 = this._check_index.Contains(2u);
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XNpc.NpcLayer, flag3);
+ List<uint> npcs = XSingleton<XEntityMgr>.singleton.GetNpcs(XSingleton<XScene>.singleton.SceneID);
+ bool flag4 = npcs != null;
+ if (flag4)
+ {
+ for (int i = 0; i < npcs.Count; i++)
+ {
+ XNpc npc = XSingleton<XEntityMgr>.singleton.GetNpc(npcs[i]);
+ bool flag5 = npc != null;
+ if (flag5)
+ {
+ XBillboardShowCtrlEventArgs event2 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ event2.show = flag3;
+ event2.Firer = npc;
+ event2.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(event2);
+ }
+ }
+ }
+ bool flag6 = this._check_index.Contains(1u);
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XRole.RoleLayer, flag6);
+ List<XEntity> ally = XSingleton<XEntityMgr>.singleton.GetAlly(XSingleton<XEntityMgr>.singleton.Player);
+ bool flag7 = ally != null;
+ if (flag7)
+ {
+ for (int j = 0; j < ally.Count; j++)
+ {
+ bool flag8 = ally[j] != null;
+ if (flag8)
+ {
+ bool flag9 = ally[j].IsRole && !ally[j].IsPlayer;
+ if (flag9)
+ {
+ XBillboardShowCtrlEventArgs event3 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ event3.show = flag6;
+ event3.Firer = ally[j];
+ event3.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(event3);
+ }
+ }
+ }
+ }
+ }
+
+ private void OnResetEntityRender()
+ {
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XPlayer.PlayerLayer, true);
+ XBillboardShowCtrlEventArgs @event = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ @event.show = true;
+ @event.type = BillBoardHideType.Photo;
+ @event.Firer = XSingleton<XEntityMgr>.singleton.Player;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XNpc.NpcLayer, true);
+ List<uint> npcs = XSingleton<XEntityMgr>.singleton.GetNpcs(XSingleton<XScene>.singleton.SceneID);
+ bool flag = npcs != null;
+ if (flag)
+ {
+ for (int i = 0; i < npcs.Count; i++)
+ {
+ XNpc npc = XSingleton<XEntityMgr>.singleton.GetNpc(npcs[i]);
+ bool flag2 = npc != null;
+ if (flag2)
+ {
+ XBillboardShowCtrlEventArgs event2 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ event2.show = true;
+ event2.Firer = npc;
+ event2.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(event2);
+ }
+ }
+ }
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XRole.RoleLayer, true);
+ List<XEntity> ally = XSingleton<XEntityMgr>.singleton.GetAlly(XSingleton<XEntityMgr>.singleton.Player);
+ for (int j = 0; j < ally.Count; j++)
+ {
+ bool flag3 = ally[j].IsRole && !ally[j].IsPlayer;
+ if (flag3)
+ {
+ XBillboardShowCtrlEventArgs event3 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ event3.show = true;
+ event3.Firer = ally[j];
+ event3.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(event3);
+ }
+ }
+ }
+
+ private void OnReqEffect()
+ {
+ RpcC2G_PhotographEffect rpc = new RpcC2G_PhotographEffect();
+ XSingleton<XClientNetwork>.singleton.Send(rpc);
+ }
+
+ public void OnRefreshEffects()
+ {
+ base.uiBehaviour.mEffectPool.ReturnAll(false);
+ this._mode_effectgo.Clear();
+ base.uiBehaviour.mEffectsBack.spriteHeight = base.uiBehaviour.mEffectPool.TplHeight * this._doc.EffectListId.Count + 60;
+ int num = (this._doc.EffectListId.Count % 2 == 0) ? (base.uiBehaviour.mEffectPool.TplHeight / 2) : 0;
+ for (int i = 0; i < this._doc.EffectListId.Count; i++)
+ {
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById(this._doc.EffectListId[i]);
+ int num2 = (i % 2 == 0) ? 1 : -1;
+ GameObject gameObject = base.uiBehaviour.mEffectPool.FetchGameObject(false);
+ this._mode_effectgo.Add(gameObject);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mEffectPool.TplPos.x, base.uiBehaviour.mEffectPool.TplPos.y + (float)(num2 * ((i + 1) / 2) * base.uiBehaviour.mEffectPool.TplHeight) + (float)num, base.uiBehaviour.mEffectPool.TplPos.z);
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowDataById[0].EffectName);
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnEffectChanged));
+ ixuicheckBox.ID = (ulong)this._doc.EffectListId[i];
+ ixuicheckBox.bChecked = false;
+ }
+ base.uiBehaviour.mEffectsMore.transform.localPosition = new Vector3(base.uiBehaviour.mEffectsMore.transform.localPosition.x, base.uiBehaviour.mEffectPool.TplPos.y - (float)((this._doc.EffectListId.Count + 1) * base.uiBehaviour.mEffectPool.TplHeight / 2), base.uiBehaviour.mEffectsMore.transform.localPosition.z);
+ bool flag = this._doc.EffectAllListId.Count == this._doc.EffectListId.Count;
+ if (flag)
+ {
+ base.uiBehaviour.mEffectsRedpoint.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mEffectsRedpoint.SetVisible(true);
+ }
+ }
+
+ private void InitLeftMenu()
+ {
+ base.uiBehaviour.mModePool.ReturnAll(false);
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("PhotoShowName");
+ string[] array = value.Split(new char[]
+ {
+ '|'
+ });
+ this._mode_go.Clear();
+ base.uiBehaviour.mModeBack.spriteHeight = base.uiBehaviour.mModePool.TplHeight * array.Length;
+ for (int i = 0; i < array.Length; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.mModePool.FetchGameObject(false);
+ int num = (i % 2 == 0) ? 1 : -1;
+ int num2 = base.uiBehaviour.mModePool.TplHeight / 2;
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mModePool.TplPos.x, base.uiBehaviour.mModePool.TplPos.y + (float)(num * ((i + 1) / 2) * base.uiBehaviour.mModePool.TplHeight), base.uiBehaviour.mModePool.TplPos.z);
+ IXUILabel ixuilabel = gameObject.transform.Find("option1/Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(array[i]);
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("option1/Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnModeChanged));
+ ixuicheckBox.ID = (ulong)((long)i);
+ ixuicheckBox.bChecked = true;
+ this._check_index.Add((uint)i);
+ this._mode_go.Add(gameObject);
+ }
+ this.OnRefreshEffects();
+ }
+
+ private void InitDance()
+ {
+ base.uiBehaviour.mDancePool.FakeReturnAll();
+ this._dance_num = 0;
+ int num = 0;
+ for (int i = 0; i < XDanceDocument.Doc.SelfConfigData.Count; i++)
+ {
+ DanceConfig.RowData danceConfig = XDanceDocument.GetDanceConfig(XDanceDocument.Doc.SelfConfigData[i].motionID);
+ bool flag = danceConfig != null && XDanceDocument.Doc.IsUnlock(XDanceDocument.Doc.SelfConfigData[i].valid, danceConfig.Condition);
+ if (flag)
+ {
+ this._dance_num++;
+ }
+ }
+ float num2 = (this._dance_num > 8) ? 8.5f : ((float)this._dance_num);
+ base.uiBehaviour.mDanceBack.spriteHeight = (int)((float)base.uiBehaviour.mModePool.TplHeight * num2) + 30;
+ base.uiBehaviour.mDanceBackSV.SetSize((float)base.uiBehaviour.mDanceBack.spriteWidth, (float)base.uiBehaviour.mModePool.TplHeight * num2);
+ for (int j = 0; j < XDanceDocument.Doc.SelfConfigData.Count; j++)
+ {
+ DanceConfig.RowData danceConfig2 = XDanceDocument.GetDanceConfig(XDanceDocument.Doc.SelfConfigData[j].motionID);
+ bool flag2 = danceConfig2 != null && XDanceDocument.Doc.IsUnlock(XDanceDocument.Doc.SelfConfigData[j].valid, danceConfig2.Condition);
+ if (flag2)
+ {
+ GameObject gameObject = base.uiBehaviour.mDancePool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.mDanceBackList.gameObject.transform;
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(danceConfig2.MotionName);
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnAnimChanged));
+ ixuicheckBox.ID = (ulong)danceConfig2.MotionID;
+ num++;
+ }
+ }
+ base.uiBehaviour.mDancePool.ActualReturnAll(false);
+ base.uiBehaviour.mDanceBackList.Refresh();
+ }
+
+ public bool IsInReadyScreenShowView()
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ return !flag && base.uiBehaviour.mDoScreenShot.IsVisible();
+ }
+ }
+}