FreeModeSelect.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using System;
  2. using System.Collections.Generic;
  3. using I2.Loc;
  4. public class FreeModeSelect : WfScreenChildren
  5. {
  6. public override void Awake()
  7. {
  8. this.RootPanel = UTY.GetChildObject(base.transform.parent.transform.parent.gameObject, "MenuSelect", false);
  9. this.free_mode_select_mgr_ = base.transform.parent.gameObject.GetComponent<SceneFreeModeSelectManager>();
  10. NDebug.AssertNull(this.free_mode_select_mgr_ != null);
  11. base.Awake();
  12. this.btn_dic_.Add("ストーリー", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/ストーリー", false).GetComponent<UIButton>());
  13. this.btn_dic_.Add("日常", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/日常", false).GetComponent<UIButton>());
  14. this.btn_dic_.Add("夜伽", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/夜伽", false).GetComponent<UIButton>());
  15. this.btn_dic_.Add("キャンセル", UTY.GetChildObject(base.root_obj, "Cancel", false).GetComponent<UIButton>());
  16. this.btn_dic_.Add("ライフモード", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/ライフモード", false).GetComponent<UIButton>());
  17. if (DailyMgr.IsLegacy)
  18. {
  19. this.btn_dic_.Add("VIP", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/VIP", false).GetComponent<UIButton>());
  20. }
  21. else
  22. {
  23. this.btn_dic_.Add("VIP", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/VIP_HEvent", false).GetComponent<UIButton>());
  24. }
  25. UILabel component = UTY.GetChildObject(base.root_obj, "Menu/ExplanatoryText/Value", false).GetComponent<UILabel>();
  26. Localize component2 = component.GetComponent<Localize>();
  27. component.text = "回想のジャンルを選択してください。";
  28. if (component2 != null)
  29. {
  30. component2.SetTerm("SceneFreeModeSelect/回想のジャンルを選択してください。");
  31. }
  32. foreach (KeyValuePair<string, UIButton> keyValuePair in this.btn_dic_)
  33. {
  34. EventDelegate eventDelegate = new EventDelegate(this, "OnClickEvent");
  35. EventDelegate.Parameter[] parameters = eventDelegate.parameters;
  36. parameters[0].value = keyValuePair.Key;
  37. EventDelegate.Add(keyValuePair.Value.onClick, eventDelegate);
  38. }
  39. UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton", false).GetComponent<UIGrid>().repositionNow = true;
  40. }
  41. protected override void OnCall()
  42. {
  43. }
  44. private void OnClickEvent(string type_name)
  45. {
  46. if (type_name != null)
  47. {
  48. if (!(type_name == "ストーリー"))
  49. {
  50. if (!(type_name == "日常"))
  51. {
  52. if (!(type_name == "VIP"))
  53. {
  54. if (!(type_name == "夜伽"))
  55. {
  56. if (!(type_name == "キャンセル"))
  57. {
  58. if (type_name == "ライフモード")
  59. {
  60. this.free_mode_select_mgr_.CallEmpireLifeMode();
  61. }
  62. }
  63. else
  64. {
  65. this.free_mode_select_mgr_.CallCharaSelect();
  66. }
  67. }
  68. else
  69. {
  70. this.free_mode_select_mgr_.CallYotogiMode();
  71. }
  72. }
  73. else
  74. {
  75. this.free_mode_select_mgr_.CallVipMode();
  76. }
  77. }
  78. else
  79. {
  80. this.free_mode_select_mgr_.CallEverydayMode();
  81. }
  82. }
  83. else
  84. {
  85. this.free_mode_select_mgr_.CallStoryMode();
  86. }
  87. }
  88. }
  89. private Dictionary<string, UIButton> btn_dic_ = new Dictionary<string, UIButton>();
  90. private SceneFreeModeSelectManager free_mode_select_mgr_;
  91. }