public void FF9BMenu_EnableMenu(Boolean active) { if (PersistenSingleton <UIManager> .Instance.QuitScene.isShowQuitUI) { return; } if (PersistenSingleton <UIManager> .Instance.State == UIManager.UIState.BattleHUD) { _commandEnable = active; AllMenuPanel.SetActive(active); HideHudHitAreaGameObject.SetActive(active); if (!active) { ButtonGroupState.DisableAllGroup(true); } else { if ((_isFromPause || ButtonGroupState.ActiveGroup != String.Empty) && !_isNeedToInit) { return; } _isNeedToInit = false; InitialBattle(); DisplayParty(); SetIdle(); } } else { _beforePauseCommandEnable = active; _isNeedToInit = active; } }
private void DisplayKeyItemSkin(Boolean visibility) { if (visibility) { Int32 keyItemId = _keyItemIdList[_currentItemIndex]; _keyItemDetailName.text = FF9TextTool.ImportantItemName(keyItemId); _keyItemDetailDescription.spacingY = _defaultSkinLabelSpacingY; String text = FF9TextTool.ImportantItemSkin(keyItemId); Single additionalWidth = 0.0f; _keyItemDetailDescription.text = _keyItemDetailDescription.PhrasePreOpcodeSymbol(text, ref additionalWidth); Loading = true; // ISSUE: method pointer _keyItemSkinTransition.TweenIn(new Byte[1], () => { Loading = false; _isShowingKeyItemDesp = true; }); ButtonGroupState.DisableAllGroup(false); ButtonGroupState.HoldActiveStateOnGroup(KeyItemGroupButton); } else { Loading = true; _isShowingKeyItemDesp = false; // ISSUE: method pointer _keyItemSkinTransition.TweenOut(new Byte[1], () => { Loading = false; ButtonGroupState.ActiveGroup = KeyItemGroupButton; Singleton <PointerManager> .Instance.SetPointerBlinkAt(ButtonGroupState.ActiveButton, false); }); ff9item.FF9Item_UseImportant(_keyItemIdList[_currentItemIndex]); DisplayKeyItem(); } }
private void DisplayCorruptAccessDialog(Action callback) { String key; switch (ISharedDataSerializer.LastErrno) { case DataSerializerErrorCode.FileCorruption: case DataSerializerErrorCode.DataCorruption: key = "LocalDecryptFailed"; goto IL_66; case DataSerializerErrorCode.CloudDataCorruption: key = "CloudDataCorrupt"; goto IL_66; case DataSerializerErrorCode.CloudConnectionTimeout: key = "CloudConnectionTimeout"; goto IL_66; case DataSerializerErrorCode.CloudFileNotFound: key = "CloudFileNotFound"; goto IL_66; } key = "CloudDataUnknownError"; IL_66: this.saveCorruptDialog = Singleton <DialogManager> .Instance.AttachDialog(Localization.Get(key), 0, 0, Dialog.TailPosition.Center, Dialog.WindowStyle.WindowStylePlain, Vector2.zero, Dialog.CaptionType.Notice); ButtonGroupState.DisableAllGroup(true); base.StartCoroutine(this.HideCorruptAccessDialog(callback)); }
private void DisplayNoSaveFoundDialog() { this.noSaveDataDialog = Singleton <DialogManager> .Instance.AttachDialog(Localization.Get("NoSaveData"), 0, 0, Dialog.TailPosition.Center, Dialog.WindowStyle.WindowStylePlain, Vector2.zero, Dialog.CaptionType.Notice); ButtonGroupState.DisableAllGroup(true); base.Loading = true; base.StartCoroutine(this.HideSaveInfoDialog(SaveLoadUI.SlotGroupButton)); }
private void RemoveCursorMemorize() { this.characterMemorize = (GameObject)null; this.characterOrderMemorize = (GameObject)null; this.currentMenu = MainMenuUI.SubMenu.Item; ButtonGroupState.RemoveCursorMemorize(MainMenuUI.SubMenuGroupButton); ButtonGroupState.RemoveCursorMemorize(MainMenuUI.CharacterGroupButton); ButtonGroupState.RemoveCursorMemorize(MainMenuUI.OrderGroupButton); ButtonGroupState.DisableAllGroup(false); }
public override Boolean OnKeyConfirm(GameObject go) { if (base.OnKeyConfirm(go)) { if (ButtonGroupState.ActiveGroup == CardUI.CardGroupButton) { if (go != this.DeleteSubmenuButton) { this.currentCardId = this.cardHudList[go.transform.GetSiblingIndex()].Id; } if (this.count[this.currentCardId] > 0) { FF9Sfx.FF9SFX_Play(103); base.Loading = true; this.deleteDialogTransition.TweenIn(delegate { base.Loading = false; ButtonGroupState.RemoveCursorMemorize(CardUI.DiscardDialogButtonGroup); ButtonGroupState.ActiveGroup = CardUI.DiscardDialogButtonGroup; ButtonGroupState.HoldActiveStateOnGroup(CardUI.CardGroupButton); }); this.prevOffsetButton.enabled = false; this.nextOffsetButton.enabled = false; this.deleteCardId = this.currentCardId; } else { FF9Sfx.FF9SFX_Play(102); } } else if (ButtonGroupState.ActiveGroup == CardUI.DiscardDialogButtonGroup) { if (go == this.DeleteSubmenuButton) { return(true); } OnDiscardDialogKeyConfirm(go); base.Loading = true; this.deleteDialogTransition.TweenOut(delegate { base.Loading = false; ButtonGroupState.ActiveGroup = CardUI.CardGroupButton; }); this.prevOffsetButton.enabled = true; this.nextOffsetButton.enabled = true; ButtonGroupState.DisableAllGroup(true); } } return(true); }
public override void Hide(UIScene.SceneVoidDelegate afterFinished = null) { base.NextSceneIsModal = false; UIScene.SceneVoidDelegate sceneVoidDelegate = delegate { PersistenSingleton <UIManager> .Instance.State = UIManager.UIState.Initial; }; if (afterFinished != null) { sceneVoidDelegate = (UIScene.SceneVoidDelegate)Delegate.Combine(sceneVoidDelegate, afterFinished); } base.Hide(sceneVoidDelegate); ButtonGroupState.DisableAllGroup(true); }
public void SetIdle() { SetCommandVisibility(false, false); SetTargetVisibility(false); SetItemPanelVisibility(false, false); SetAbilityPanelVisibility(false, false); BackButton.SetActive(false); _currentSilenceStatus = false; _currentMpValue = -1; _currentCommandIndex = CommandMenu.Attack; _currentSubMenuIndex = -1; CurrentPlayerIndex = -1; //currentTranceTrigger = false; ButtonGroupState.DisableAllGroup(true); _partyDetail.SetDetailButtonState(UIButtonColor.State.Normal, false); }
public void Hide() { if (!isShowQuitUI) { return; } isShowQuitUI = false; gameObject.SetActive(false); if (String.IsNullOrEmpty(previousActiveGroup)) { ButtonGroupState.DisableAllGroup(); } else { ButtonGroupState.ActiveGroup = previousActiveGroup; } FF9StateSystem.Settings.StartGameTime = Time.time; PersistenSingleton <UIManager> .Instance.SetEventEnable(previousEventEnable); PersistenSingleton <UIManager> .Instance.SetMenuControlEnable(previousMenuControlEnable); PersistenSingleton <UIManager> .Instance.SetPlayerControlEnable(previousPlayerControlEnable, null); PersistenSingleton <HonoInputManager> .Instance.DisablePrimaryKey = previousDisablePrimaryKey; if (PersistenSingleton <UIManager> .Instance.Dialogs != null) { PersistenSingleton <UIManager> .Instance.Dialogs.PauseAllDialog(false); } if (PersistenSingleton <UIManager> .Instance.State == UIManager.UIState.QuadMistBattle) { QuadMistGame.main.Resume(); } else if (PersistenSingleton <UIManager> .Instance.State == UIManager.UIState.EndGame || PersistenSingleton <UIManager> .Instance.State == UIManager.UIState.Title) { Time.timeScale = previousTimescale; } vib.VIB_actuatorSet(0, previousVibLeft, previousVibRight); vib.VIB_actuatorSet(1, previousVibLeft, previousVibRight); if (onFinishHideQuitUI != null) { onFinishHideQuitUI(); onFinishHideQuitUI = null; } }
public void ChangeUIState(UIManager.UIState uiState) { if (uiState != this.state) { this.prevState = this.state; this.State = uiState; UICamera.selectedObject = (GameObject)null; ButtonGroupState.DisableAllGroup(true); Singleton <HelpDialog> .Instance.SetDialogVisibility(false); this.Booster.CloseBoosterPanelImmediately(); UIScene sceneFromState = this.GetSceneFromState(uiState); if (sceneFromState != (UnityEngine.Object)null) { sceneFromState.Show((UIScene.SceneVoidDelegate)null); } if (this.prevState == UIManager.UIState.MainMenu && this.state == UIManager.UIState.FieldHUD) { global::Debug.Log("FIX SSTHON-3788 : Reset lazykey when state change from mainmenu to field"); UIManager.Input.ResetKeyCode(); } } }
private void DisplayCorruptAccessDialog(String group, SaveLoadUI.SerializeType serializeType, DataSerializerErrorCode errorCode) { String key; switch (errorCode) { case DataSerializerErrorCode.FileCorruption: case DataSerializerErrorCode.DataCorruption: key = "LocalDecryptFailed"; break; case DataSerializerErrorCode.CloudDataCorruption: key = "CloudDataCorrupt"; break; case DataSerializerErrorCode.CloudConnectionTimeout: key = "CloudConnectionTimeout"; break; case DataSerializerErrorCode.CloudFileNotFound: key = "CloudFileNotFound"; break; case DataSerializerErrorCode.CloudConnectionError: key = "CloudDataUnknownError"; break; default: key = "CloudDataUnknownError"; break; } this.noSaveDataDialog = Singleton <DialogManager> .Instance.AttachDialog(Localization.Get(key), 0, 0, Dialog.TailPosition.Center, Dialog.WindowStyle.WindowStylePlain, Vector2.zero, Dialog.CaptionType.Notice); ButtonGroupState.DisableAllGroup(true); base.Loading = true; base.StartCoroutine(this.HideSaveInfoDialog(group)); }
public override Boolean OnKeyConfirm(GameObject go) { if (base.OnKeyConfirm(go)) { if (ButtonGroupState.ActiveGroup == SaveLoadUI.SlotGroupButton) { FF9Sfx.FF9SFX_Play(103); this.currentSlot = go.transform.GetSiblingIndex(); ButtonGroupState.DisableAllGroup(true); this.LoadingPreviewDialog.SetActive(true); FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpCheck"); base.Loading = true; this.timeCounter = Time.time; FF9StateSystem.Serializer.LoadSlotPreview(this.currentSlot, new ISharedDataSerializer.OnLoadSlotFinish(this.OnFinishedLoadPreview)); } else if (ButtonGroupState.ActiveGroup == SaveLoadUI.FileGroupButton) { this.currentFile = go.GetComponent <ScrollItemKeyNavigation>().ID; if (this.type == SaveLoadUI.SerializeType.Save) { FF9Sfx.FF9SFX_Play(103); if (this.isFileExistList[this.currentFile]) { this.DisplayOverWriteDialog(); ButtonGroupState.ActiveGroup = SaveLoadUI.ConfirmDialogGroupButton; } else { ButtonGroupState.DisableAllGroup(true); FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpSave"); FF9UIDataTool.DisplayTextLocalize(this.loadingAccessText, "WarningSaveData"); this.LoadingAccessPanel.SetActive(true); base.StartCoroutine("RunProgressBar"); this.timeCounter = Time.time; base.Loading = true; FF9StateSystem.Settings.UpdateTickTime(); FF9StateSystem.Serializer.Save(this.currentSlot, this.currentFile, (ISharedDataSerializer.OnSaveLoadStart)null, new ISharedDataSerializer.OnSaveFinish(this.OnFinishedSaveFile)); } } else if (this.isFileExistList[this.currentFile]) { FF9Sfx.FF9SFX_Play(103); ButtonGroupState.DisableAllGroup(true); FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpLoad"); FF9UIDataTool.DisplayTextLocalize(this.loadingAccessText, "WarningAccessData"); this.LoadingAccessPanel.SetActive(true); base.StartCoroutine("RunProgressBar"); this.timeCounter = Time.time; base.Loading = true; FF9StateSystem.Serializer.Load(this.currentSlot, this.currentFile, (ISharedDataSerializer.OnSaveLoadStart)null, new ISharedDataSerializer.OnLoadFinish(this.OnFinishedLoadFile)); } else { FF9Sfx.FF9SFX_Play(102); } } else if (ButtonGroupState.ActiveGroup == SaveLoadUI.ConfirmDialogGroupButton) { this.OverWriteDialog.SetActive(false); if (go.transform.GetSiblingIndex() == 1) { FF9Sfx.FF9SFX_Play(103); ButtonGroupState.DisableAllGroup(true); FF9UIDataTool.DisplayTextLocalize(this.HelpTitleLabel, "SaveHelpSave"); FF9UIDataTool.DisplayTextLocalize(this.loadingAccessText, "WarningSaveData"); this.LoadingAccessPanel.SetActive(true); base.StartCoroutine("RunProgressBar"); this.timeCounter = Time.time; base.Loading = true; FF9StateSystem.Settings.UpdateTickTime(); FF9StateSystem.Serializer.Save(this.currentSlot, this.currentFile, (ISharedDataSerializer.OnSaveLoadStart)null, new ISharedDataSerializer.OnSaveFinish(this.OnFinishedSaveFile)); } else { FF9Sfx.FF9SFX_Play(101); ButtonGroupState.ActiveGroup = SaveLoadUI.FileGroupButton; } } } return(true); }
public void OnLevelWasLoaded(Int32 sceneNo) { Localization.CurrentLanguage = FF9StateSystem.Settings.CurrentLanguage; this.WorldHUDScene.gameObject.SetActive(false); this.FieldHUDScene.gameObject.SetActive(false); this.BattleHUDScene.gameObject.SetActive(false); this.MainMenuScene.gameObject.SetActive(false); this.ItemScene.gameObject.SetActive(false); this.AbilityScene.gameObject.SetActive(false); this.EquipScene.gameObject.SetActive(false); this.StatusScene.gameObject.SetActive(false); this.CardScene.gameObject.SetActive(false); this.ConfigScene.gameObject.SetActive(false); this.SaveLoadScene.gameObject.SetActive(false); this.CloudScene.gameObject.SetActive(false); this.PauseScene.gameObject.SetActive(false); this.ShopScene.gameObject.SetActive(false); this.NameSettingScene.gameObject.SetActive(false); this.PartySettingScene.gameObject.SetActive(false); this.TutorialScene.gameObject.SetActive(false); this.BattleResultScene.gameObject.SetActive(false); this.GameOverScene.gameObject.SetActive(false); this.TitleScene.gameObject.SetActive(false); this.QuadMistScene.gameObject.SetActive(false); this.ChocographScene.gameObject.SetActive(false); this.EndingScene.gameObject.SetActive(false); this.EndGameScene.gameObject.SetActive(false); this.MainMenuScene.SubMenuPanel.SetActive(false); ButtonGroupState.DisableAllGroup(true); ButtonGroupState.HelpEnabled = false; if (this.Dialogs != (UnityEngine.Object)null) { this.Dialogs.CloseAll(); } String loadedLevelName = Application.loadedLevelName; Boolean active = false; Boolean isEnable = false; this.UnityScene = UIManager.Scene.None; if (loadedLevelName == SceneDirector.FieldMapSceneName) { this.UnityScene = UIManager.Scene.Field; this.fieldCamera = GameObject.Find("FieldMap Root/FieldMap Camera").GetComponent <Camera>(); this.ChangeUIState(UIManager.UIState.FieldHUD); TimerUI.Init(); this.FieldHUDScene.Loading = true; active = true; } else if (loadedLevelName == SceneDirector.BattleMapSceneName) { this.UnityScene = UIManager.Scene.Battle; InitializeBattleCamera(); this.ChangeUIState(UIManager.UIState.BattleHUD); TimerUI.Init(); this.BattleHUDScene.Loading = true; active = true; } else if (loadedLevelName == SceneDirector.WorldMapSceneName) { this.UnityScene = UIManager.Scene.World; this.worldCamera = GameObject.Find("WorldMapRoot/WorldCamera").GetComponent <Camera>(); this.WorldHUDScene.Loading = true; active = true; } else if (loadedLevelName == "Title") { this.Booster.Initial(); PersistenSingleton <OverlayCanvas> .Instance.Restart(); this.UnityScene = UIManager.Scene.Title; this.ChangeUIState(UIManager.UIState.Title); } else if (loadedLevelName == "QuadMist") { this.UnityScene = UIManager.Scene.QuadMist; } else if (loadedLevelName == "UI") { this.UnityScene = UIManager.Scene.Pure; this.ChangeUIState(UIManager.UIState.FieldHUD); } else if (loadedLevelName == "FieldMapDebug") { this.UnityScene = UIManager.Scene.Field; isEnable = true; active = true; } else if (loadedLevelName == "BattleMapDebug") { this.UnityScene = UIManager.Scene.Battle; InitializeBattleCamera(); this.ChangeUIState(UIManager.UIState.BattleHUD); TimerUI.Init(); isEnable = true; active = true; } else if (loadedLevelName == "WorldMapDebug") { this.UnityScene = UIManager.Scene.World; this.worldCamera = GameObject.Find("WorldMapRoot/WorldCamera").GetComponent <Camera>(); isEnable = true; active = true; } else if (loadedLevelName == "EndGame") { this.UnityScene = UIManager.Scene.EndGame; } else if (loadedLevelName == "SwirlScene") { this.UnityScene = UIManager.Scene.None; } else if (loadedLevelName == "Ending") { this.UnityScene = UIManager.Scene.Ending; isEnable = false; active = false; } this.Booster.CloseBoosterPanelImmediately(); if (!FF9StateSystem.World.IsBeeScene) { PersistenSingleton <OverlayCanvas> .Instance.overlayBoosterUI.UpdateBoosterSize(); PersistenSingleton <OverlayCanvas> .Instance.overlayBoosterUI.boosterContainer.SetActive(active); this.SetPlayerControlEnable(isEnable, (Action)null); this.SetMenuControlEnable(false); } FF9StateSystem.Settings.SetFastForward(FF9StateSystem.Settings.IsFastForward); }