private void Awake() { base.FadingComponent = this.ScreenFadeGameObject.GetComponent <HonoFading>(); this.helpSlotLabel = this.HelpPanel.GetChild(1).GetChild(0).GetComponent <UILabel>(); this.successfulAccessGameObject = this.SuccessfulAccessPanel.GetChild(0); this.fileScrollList = this.FileListPanel.GetChild(1).GetComponent <SnapDragScrollView>(); this.progressBar = this.LoadingAccessPanel.GetChild(2).GetComponent <UISlider>(); this.loadingAccessText = this.LoadingAccessPanel.GetChild(1); foreach (Object obj in this.SlotListPanel.transform) { Transform transform = (Transform)obj; Int32 siblingIndex = transform.GetSiblingIndex(); if (siblingIndex != 10) { UILabel component = transform.gameObject.GetChild(0).GetComponent <UILabel>(); this.slotNameLabelList.Add(component); this.slotNameButtonList.Add(transform.gameObject.GetComponent <ButtonGroupState>()); UIEventListener uieventListener = UIEventListener.Get(transform.gameObject); uieventListener.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uieventListener.onClick, new UIEventListener.VoidDelegate(this.onClick)); } } foreach (Object obj2 in this.FileListPanel.GetChild(1).GetChild(0).transform) { Transform transform2 = (Transform)obj2; SaveLoadUI.FileInfoHUD item = new SaveLoadUI.FileInfoHUD(transform2.gameObject); this.fileInfoHudList.Add(item); UIEventListener uieventListener2 = UIEventListener.Get(transform2.gameObject); uieventListener2.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uieventListener2.onClick, new UIEventListener.VoidDelegate(this.onClick)); } this.screenFadePanel = this.ScreenFadeGameObject.GetParent().GetComponent <UIPanel>(); UIEventListener uieventListener3 = UIEventListener.Get(this.OverWriteDialog.GetChild(1)); uieventListener3.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uieventListener3.onClick, new UIEventListener.VoidDelegate(this.onClick)); UIEventListener uieventListener4 = UIEventListener.Get(this.OverWriteDialog.GetChild(2)); uieventListener4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uieventListener4.onClick, new UIEventListener.VoidDelegate(this.onClick)); }
private void DisplayFileInfo(Int32 index, SharedDataPreviewSlot file) { SaveLoadUI.FileInfoHUD fileInfoHUD = this.fileInfoHudList[index]; fileInfoHUD.Self.SetActive(true); fileInfoHUD.FileNoLabel.text = String.Format(Localization.Get("FileNo"), (index + 1).ToString("0#")); if (file != null && !this.isFileCorrupt[index] && !file.IsPreviewCorrupted) { fileInfoHUD.Container.SetActive(true); fileInfoHUD.EmptySlotTextGameObject.SetActive(false); Int32 num = 1; String text = String.Empty; String text2 = String.Empty; Boolean flag = false; Int32 num2 = 0; foreach (SharedDataPreviewCharacterInfo sharedDataPreviewCharacterInfo in file.CharacterInfoList) { fileInfoHUD.CharacterAvatarList[num2].alpha = 0f; fileInfoHUD.CharacterAvatarList[num2].spriteName = String.Empty; if (sharedDataPreviewCharacterInfo != null) { if (!flag) { num = sharedDataPreviewCharacterInfo.Level; text = sharedDataPreviewCharacterInfo.Name; flag = true; } fileInfoHUD.CharacterAvatarList[num2].alpha = 1f; FF9UIDataTool.DisplayCharacterAvatar(sharedDataPreviewCharacterInfo.SerialID, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), fileInfoHUD.CharacterAvatarList[num2], false); String text3 = text2; text2 = String.Concat(new String[] { text3, sharedDataPreviewCharacterInfo.Name, "[XTAB=80][YADD=4]", Localization.Get("LvDialogIcon"), "[YSUB=2][FEED=1] ", sharedDataPreviewCharacterInfo.Level.ToString(), "\n" }); } num2++; } fileInfoHUD.LeaderNameLabel.text = text; fileInfoHUD.LeaderLvLabel.text = num.ToString(); fileInfoHUD.GilLabel.text = file.Gil.ToString() + "[YSUB=1.3][sub]G"; fileInfoHUD.LocationNameLabel.text = file.Location; Color color = FF9TextTool.White; Double num3 = (Double)(file.PlayDuration % 360000f); switch ((Int32)(file.PlayDuration / 360000f)) { case 0: color = FF9TextTool.White; break; case 1: color = FF9TextTool.Red; break; case 2: color = FF9TextTool.Yellow; break; case 3: color = FF9TextTool.Cyan; break; case 4: color = FF9TextTool.Magenta; break; case 5: color = FF9TextTool.Green; break; default: num3 = 359999.0; color = FF9TextTool.Green; break; } String text4 = ((Int32)(num3 / 3600.0)).ToString("0#"); String text5 = ((Int32)(num3 / 60.0) % 60).ToString("0#"); String text6 = ((Int32)num3 % 60).ToString("0#"); fileInfoHUD.TimeLabel.color = color; fileInfoHUD.TimeLabel.text = String.Concat(new String[] { text4, " : ", text5, " : ", text6 }); this.DisplayWindowBackground(fileInfoHUD.Self, (file.win_type != 0UL) ? FF9UIDataTool.BlueAtlas : FF9UIDataTool.GrayAtlas); fileInfoHUD.Button.Help.TextKey = String.Empty; fileInfoHUD.Button.Help.Text = text2.Remove(text2.Length - 1); } else if (file == null) { fileInfoHUD.Container.SetActive(false); fileInfoHUD.EmptySlotTextGameObject.SetActive(true); if (this.isFileCorrupt[index]) { fileInfoHUD.Button.Help.TextKey = "CorruptFile"; fileInfoHUD.EmptySlotTextLabel.text = Localization.Get("CorruptFile"); fileInfoHUD.EmptySlotTextLabel.color = FF9TextTool.Red; } else { fileInfoHUD.Button.Help.TextKey = "NoSaveHelp"; fileInfoHUD.EmptySlotTextLabel.text = Localization.Get("EmptyFile"); fileInfoHUD.EmptySlotTextLabel.color = FF9TextTool.White; } this.DisplayWindowBackground(fileInfoHUD.Self, (UIAtlas)null); } else if (file.IsPreviewCorrupted) { fileInfoHUD.Container.SetActive(false); fileInfoHUD.EmptySlotTextGameObject.SetActive(true); fileInfoHUD.Button.Help.TextKey = "CorruptFile"; fileInfoHUD.EmptySlotTextLabel.text = Localization.Get("CorruptFile"); fileInfoHUD.EmptySlotTextLabel.color = FF9TextTool.Red; this.DisplayWindowBackground(fileInfoHUD.Self, (UIAtlas)null); } }