private void DisplayFile(List <SharedDataPreviewSlot> data) { ScrollButton component = this.FileListPanel.GetChild(0).GetComponent <ScrollButton>(); UIPanel component2 = this.FileListPanel.GetChild(1).GetComponent <UIPanel>(); Int32 num = 0; Double num2 = 0.0; this.currentFile = 0; this.isFileExistList.Clear(); this.isFileCorrupt.Clear(); foreach (SharedDataPreviewSlot sharedDataPreviewSlot in data) { if (sharedDataPreviewSlot != null && sharedDataPreviewSlot.Timestamp > num2) { num2 = sharedDataPreviewSlot.Timestamp; this.currentFile = num; } this.isFileExistList.Add(sharedDataPreviewSlot != (SharedDataPreviewSlot)null); this.isFileCorrupt.Add(false); this.DisplayFileInfo(num++, sharedDataPreviewSlot); } component.CheckScrollPosition(); ButtonGroupState.SetCursorStartSelect(this.fileInfoHudList[this.currentFile].Self, SaveLoadUI.FileGroupButton); ButtonGroupState.RemoveCursorMemorize(SaveLoadUI.FileGroupButton); ButtonGroupState.ActiveGroup = SaveLoadUI.FileGroupButton; this.fileScrollList.ScrollToIndex(this.currentFile); }
public void AfterShowCharacter() { ButtonGroupState.SetCursorStartSelect(this.GetGameObjectFromSubMenu(this.currentMenu), MainMenuUI.SubMenuGroupButton); ButtonGroupState.RemoveCursorMemorize(MainMenuUI.SubMenuGroupButton); ButtonGroupState.SetPointerDepthToGroup(10, MainMenuUI.SubMenuGroupButton); ButtonGroupState.SetPointerDepthToGroup(12, MainMenuUI.OrderGroupButton); ButtonGroupState.SetPointerOffsetToGroup(new Vector2(10f, 0f), MainMenuUI.CharacterGroupButton); ButtonGroupState.SetPointerOffsetToGroup(new Vector2(30f, -28f), MainMenuUI.OrderGroupButton); ButtonGroupState.ActiveGroup = MainMenuUI.SubMenuGroupButton; }
public override void Show(UIScene.SceneVoidDelegate afterFinished = null) { UIScene.SceneVoidDelegate sceneVoidDelegate = delegate { ButtonGroupState.SetPointerDepthToGroup(4, ChocographUI.ItemGroupButton); ButtonGroupState.SetPointerOffsetToGroup(new Vector2(30f, 0f), ChocographUI.ItemGroupButton); ButtonGroupState.SetPointerLimitRectToGroup(this.ChocographListPanel.GetComponent <UIWidget>(), (Single)this.chocographScrollList.ItemHeight, ChocographUI.ItemGroupButton); ButtonGroupState.SetScrollButtonToGroup(this.chocoboScrollButton, ChocographUI.ItemGroupButton); ButtonGroupState.RemoveCursorMemorize(ChocographUI.SubMenuGroupButton); ButtonGroupState.ActiveGroup = ChocographUI.SubMenuGroupButton; }; if (afterFinished != null) { sceneVoidDelegate = (UIScene.SceneVoidDelegate)Delegate.Combine(sceneVoidDelegate, afterFinished); } SceneDirector.FadeEventSetColor(FadeMode.Sub, Color.black); base.Show(sceneVoidDelegate); this.ClearLatestUI(); this.GetEventData(); this.DisplayChocoboAbilityInfo(); this.DisplayInventoryInfo(); this.DisplayChocographList(); if (FF9StateSystem.PCPlatform) { this.HelpDespLabelGameObject.SetActive(true); } else { this.HelpDespLabelGameObject.SetActive(false); } if (ChocographUI.CurrentSelectedChocograph != -1) { ButtonGroupState.SetCursorStartSelect(this.chocographItemList[ChocographUI.CurrentSelectedChocograph].Self, ChocographUI.ItemGroupButton); this.DisplaySelected(ChocographUI.CurrentSelectedChocograph); this.SetCancelButton(true); this.chocographScrollList.ScrollToIndex(ChocographUI.CurrentSelectedChocograph); } else { ButtonGroupState.SetCursorStartSelect(this.chocographItemList[0].Self, ChocographUI.ItemGroupButton); this.SetCancelButton(false); this.chocographScrollList.ScrollToIndex(0); } this.chocoboScrollButton.DisplayScrollButton(false, false); }
public override Boolean OnItemSelect(GameObject go) { if (base.OnItemSelect(go) && ButtonGroupState.ActiveGroup == ChocographUI.ItemGroupButton) { this.currentSelectItemIndex = go.GetComponent <ScrollItemKeyNavigation>().ID; if (this.hasMap[this.currentSelectItemIndex]) { this.HintContentPanel.SetActive(true); this.DisplayHint(this.currentSelectItemIndex); } else { this.HintContentPanel.SetActive(false); } ButtonGroupState.SetCursorStartSelect(go, ChocographUI.ItemGroupButton); } return(true); }
public override Boolean OnItemSelect(GameObject go) { if (base.OnItemSelect(go)) { if (ButtonGroupState.ActiveGroup == SaveLoadUI.SlotGroupButton) { if (this.currentSlot != go.transform.GetSiblingIndex()) { this.currentSlot = go.transform.GetSiblingIndex(); this.helpSlotLabel.text = String.Format(Localization.Get("SlotNo"), this.currentSlot + 1); } } else if (ButtonGroupState.ActiveGroup == SaveLoadUI.FileGroupButton) { ButtonGroupState.SetCursorStartSelect(go, SaveLoadUI.FileGroupButton); } } return(true); }
public override void Show(UIScene.SceneVoidDelegate afterFinished = null) { if (FF9StateSystem.aaaaPlatform) { if (this.type == SaveLoadUI.SerializeType.Load) { FF9StateSystem.Serializer.Load(0, 0, new ISharedDataSerializer.OnSaveLoadStart(this.LoadDataStartDelgate), new ISharedDataSerializer.OnLoadFinish(this.LoadDataFinishDelegate)); } else { FF9StateSystem.Serializer.Save(0, 0, new ISharedDataSerializer.OnSaveLoadStart(this.SaveDataStartDelegate), new ISharedDataSerializer.OnSaveFinish(this.SaveDataFinishDelegate)); } } else { UIScene.SceneVoidDelegate sceneVoidDelegate = delegate { ButtonGroupState.SetPointerDepthToGroup(11, SaveLoadUI.FileGroupButton); ButtonGroupState.SetPointerOffsetToGroup(new Vector2(48f, 0f), SaveLoadUI.SlotGroupButton); ButtonGroupState.SetPointerOffsetToGroup(new Vector2(48f, 0f), SaveLoadUI.FileGroupButton); ButtonGroupState.SetPointerOffsetToGroup(new Vector2(180f, 10f), SaveLoadUI.ConfirmDialogGroupButton); ButtonGroupState.SetPointerLimitRectToGroup(this.FileListPanel.GetComponent <UIWidget>(), (Single)this.fileScrollList.ItemHeight, SaveLoadUI.FileGroupButton); ButtonGroupState.SetScrollButtonToGroup(this.FileListPanel.GetChild(0).GetComponent <ScrollButton>(), SaveLoadUI.FileGroupButton); Int32 index = (Int32)((FF9StateSystem.Settings.LatestSlot <= -1) ? 0 : FF9StateSystem.Settings.LatestSlot); ButtonGroupState.SetCursorStartSelect(this.slotNameButtonList[index].gameObject, SaveLoadUI.SlotGroupButton); ButtonGroupState.ActiveGroup = SaveLoadUI.SlotGroupButton; }; if (afterFinished != null) { sceneVoidDelegate = (UIScene.SceneVoidDelegate)Delegate.Combine(sceneVoidDelegate, afterFinished); } SceneDirector.FadeEventSetColor(FadeMode.Sub, Color.black); base.Show(sceneVoidDelegate); this.currentSlot = -1; this.currentFile = -1; this.setSerialzeType(this.Type); this.screenFadePanel.depth = 7; this.DisplaySlot(); this.DisplayHelp(); } }
public override Boolean OnKeyConfirm(GameObject go) { if (base.OnKeyConfirm(go)) { if (ButtonGroupState.ActiveGroup == SelectCharGroupButton) { FF9Sfx.FF9SFX_Play(103); this.currentCharacterSelect = this.GetCurrentSelect(go); this.currentCharacterId = this.GetCurrentId(go); ButtonGroupState.SetCursorStartSelect((this.currentCharacterSelect.Group != Mode.Menu) ? go.GetChild(0) : go.GetChild(2), MoveCharGroupButton); ButtonGroupState.RemoveCursorMemorize(MoveCharGroupButton); ButtonGroupState.ActiveGroup = MoveCharGroupButton; ButtonGroupState.HoldActiveStateOnGroup(SelectCharGroupButton); foreach (CharacterOutsidePartyHud current in this.outsidePartyHudList) { ButtonGroupState.SetButtonEnable(current.MoveButton, this.currentCharacterId == FF9PARTY_NONE || !this.info.fix[this.currentCharacterId]); } } else if (ButtonGroupState.ActiveGroup == MoveCharGroupButton) { PartySelect currentSelect = this.GetCurrentSelect(go); Byte currentId = this.GetCurrentId(go); if (this.currentCharacterSelect.Group == Mode.Select && currentId != FF9PARTY_NONE && this.info.fix[currentId]) { FF9Sfx.FF9SFX_Play(102); } else { FF9Sfx.FF9SFX_Play(103); this.SwapCharacter(this.currentCharacterSelect, currentSelect); this.DisplayCharacter(); this.DisplayCharacterInfo(this.currentCharacterId); ButtonGroupState.SetCursorMemorize(go.transform.parent.gameObject, SelectCharGroupButton); ButtonGroupState.ActiveGroup = SelectCharGroupButton; } } } return(true); }