FreeModeSelect.cs 2.7 KB

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