FreeModeSelect.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. if (DailyMgr.IsLegacy)
  17. {
  18. this.btn_dic_.Add("VIP", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/VIP", false).GetComponent<UIButton>());
  19. }
  20. else
  21. {
  22. this.btn_dic_.Add("VIP", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/VIP_HEvent", false).GetComponent<UIButton>());
  23. }
  24. UILabel component = UTY.GetChildObject(base.root_obj, "Menu/ExplanatoryText/Value", false).GetComponent<UILabel>();
  25. Localize component2 = component.GetComponent<Localize>();
  26. component.text = "回想のジャンルを選択してください。";
  27. if (component2 != null)
  28. {
  29. component2.SetTerm("SceneFreeModeSelect/回想のジャンルを選択してください。");
  30. }
  31. foreach (KeyValuePair<string, UIButton> keyValuePair in this.btn_dic_)
  32. {
  33. EventDelegate eventDelegate = new EventDelegate(this, "OnClickEvent");
  34. EventDelegate.Parameter[] parameters = eventDelegate.parameters;
  35. parameters[0].value = keyValuePair.Key;
  36. EventDelegate.Add(keyValuePair.Value.onClick, eventDelegate);
  37. }
  38. UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton", false).GetComponent<UIGrid>().repositionNow = true;
  39. }
  40. protected override void OnCall()
  41. {
  42. }
  43. private void OnClickEvent(string type_name)
  44. {
  45. if (type_name != null)
  46. {
  47. if (!(type_name == "ストーリー"))
  48. {
  49. if (!(type_name == "日常"))
  50. {
  51. if (!(type_name == "VIP"))
  52. {
  53. if (!(type_name == "夜伽"))
  54. {
  55. if (type_name == "キャンセル")
  56. {
  57. this.free_mode_select_mgr_.CallCharaSelect();
  58. }
  59. }
  60. else
  61. {
  62. this.free_mode_select_mgr_.CallYotogiMode();
  63. }
  64. }
  65. else
  66. {
  67. this.free_mode_select_mgr_.CallVipMode();
  68. }
  69. }
  70. else
  71. {
  72. this.free_mode_select_mgr_.CallEverydayMode();
  73. }
  74. }
  75. else
  76. {
  77. this.free_mode_select_mgr_.CallStoryMode();
  78. }
  79. }
  80. }
  81. private Dictionary<string, UIButton> btn_dic_ = new Dictionary<string, UIButton>();
  82. private SceneFreeModeSelectManager free_mode_select_mgr_;
  83. }