public void loadView() { if (SettingManager.REGULAR_MODE) { this.transform.FindChild("FuncPanel").gameObject.SetActive(true); } else { this.transform.FindChild("FuncPanel").gameObject.SetActive(false); } NoticeManager.getResNoticeCount(); // リスト全削除 int pfCnt = tPfbParent.childCount; for (int i = 0; i < pfCnt; i++) { DestroyImmediate(tPfbParent.Find("NoticeElement").gameObject); } // ビルトインSYSMessageデータ作成 createBuiltInMessage(); // Resultデータ作成 (新規 結果集計) createNoticeFromResult(); // リストPrefab作成 // リスト作成 (ビルトインSYSMessage) for (int pCnt = 0; pCnt < NoticeManager.getSysNoticeCount(); pCnt++) { NoticeManager.posNoticeOfListIdx(pCnt); if (NoticeManager.noDispFlg) { continue; } Transform pt = Instantiate(pfbMember).transform; pt.name = pfbMember.name; pt.SetParent(tPfbParent, false); if (NoticeManager.readStat == 0) { pt.FindChild("ImgItem/txtNew").gameObject.SetActive(true); pt.FindChild("ImgItem/txtTitle").GetComponent <Outline>().enabled = true; pt.FindChild("ImgItem").GetComponent <Image>().color = Colors.Lightyellow; } else { pt.FindChild("ImgItem/txtNew").gameObject.SetActive(false); pt.FindChild("ImgItem/txtTitle").GetComponent <Outline>().enabled = false; pt.FindChild("ImgItem").GetComponent <Image>().color = Colors.White; } if (NoticeManager.category == NoticeManager.CATE_SYSTEM) { pt.FindChild("ImgItem/txtTitle").GetComponent <Text> ().text = NoticeManager.noticeTitle; NoticeElement noticeElement = pt.FindChild("ImgItem").GetComponent <NoticeElement> (); noticeElement.readStat = NoticeManager.readStat; noticeElement.category = NoticeManager.category; noticeElement.noticeDate = NoticeManager.noticeDate; noticeElement.title = NoticeManager.noticeTitle; noticeElement.message = NoticeManager.message; } } // リスト作成 (結果集計) for (int pCnt = 0; pCnt < NoticeManager.getResNoticeCount(); pCnt++) { NoticeManager.posNoticeOfListIdx(pCnt); Transform pt = Instantiate(pfbMember).transform; pt.name = pfbMember.name; pt.SetParent(tPfbParent, false); if (NoticeManager.readStat == 0) { pt.FindChild("ImgItem/txtNew").gameObject.SetActive(true); pt.FindChild("ImgItem/txtTitle").GetComponent <Outline>().enabled = true; pt.GetComponent <Image>().color = Colors.Lightyellow; } else { pt.FindChild("ImgItem/txtNew").gameObject.SetActive(false); pt.FindChild("ImgItem/txtTitle").GetComponent <Outline>().enabled = false; pt.GetComponent <Image>().color = Colors.White; } if (NoticeManager.category == NoticeManager.CATE_RESULT) { string txtTitle = NoticeManager.sumDate.Substring(0, 4) + "年" + NoticeManager.sumDate.Substring(5, 2) + "月" + NoticeManager.sumDate.Substring(8, 2) + "日"; pt.FindChild("ImgItem/txtTitle").GetComponent <Text> ().text = "試合集計結果 " + txtTitle; NoticeElement noticeElement = pt.FindChild("ImgItem").GetComponent <NoticeElement> (); noticeElement.readStat = NoticeManager.readStat; noticeElement.category = NoticeManager.category; noticeElement.noticeDate = NoticeManager.noticeDate; noticeElement.sumDate = NoticeManager.sumDate; noticeElement.sumEndDate = NoticeManager.sumEndDate; } } _OnSort(); }