private void FillSlots() { this.m_Slots.Clear(); for (int i = 0; i < LoadSaveGameMenuCommon.s_MaxSlots; i++) { SaveGameMenuSlot component = base.transform.FindDeepChild("Slot" + i.ToString()).GetComponent <SaveGameMenuSlot>(); DebugUtils.Assert(component, true); this.m_Slots.Add(component); } for (int j = 0; j < LoadSaveGameMenuCommon.s_MaxSlots; j++) { this.m_Slots[j].SetSaveInfo(SaveGameInfo.ReadSaveSlot(j)); } }
private void UpdateContinueButton() { new SaveGameInfo?[4]; for (int i = 0; i < LoadSaveGameMenuCommon.s_MaxSlots; i++) { SaveGameInfo?lastSavedGameInfo = SaveGameInfo.ReadSaveSlot(i); if (lastSavedGameInfo != null && (this.m_LastSavedGameInfo == null || this.m_LastSavedGameInfo.Value.date < lastSavedGameInfo.Value.date)) { this.m_LastSavedGameInfo = lastSavedGameInfo; } } bool flag = this.m_LastSavedGameInfo != null && this.m_LastSavedGameInfo.Value.loadable && this.m_LastSavedGameInfo.Value.game_version >= GreenHellGame.s_GameVersionReleaseCandidate; this.m_Continue.gameObject.SetActive(flag); this.m_VLine.gameObject.SetActive(!flag); this.m_VLineWContinue.gameObject.SetActive(flag); this.m_ContinueSlot.SetActive(false); Text component = this.m_ContinueSlot.transform.FindDeepChild("Header").GetComponent <Text>(); string text; if (this.m_LastSavedGameInfo == null) { text = null; } else { SaveGameInfo valueOrDefault = this.m_LastSavedGameInfo.GetValueOrDefault(); text = valueOrDefault.GetInfoText(); } component.text = (text ?? ""); Text component2 = this.m_ContinueSlot.transform.FindDeepChild("Text").GetComponent <Text>(); string text2; if (this.m_LastSavedGameInfo == null) { text2 = null; } else { SaveGameInfo valueOrDefault = this.m_LastSavedGameInfo.GetValueOrDefault(); text2 = valueOrDefault.date.ToString(); } component2.text = (text2 ?? ""); }