12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- using System;
- using System.Collections.Generic;
- using I2.Loc;
- public class FreeModeSelect : WfScreenChildren
- {
- public override void Awake()
- {
- this.RootPanel = UTY.GetChildObject(base.transform.parent.transform.parent.gameObject, "MenuSelect", false);
- this.free_mode_select_mgr_ = base.transform.parent.gameObject.GetComponent<SceneFreeModeSelectManager>();
- NDebug.AssertNull(this.free_mode_select_mgr_ != null);
- base.Awake();
- this.btn_dic_.Add("ストーリー", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/ストーリー", false).GetComponent<UIButton>());
- this.btn_dic_.Add("日常", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/日常", false).GetComponent<UIButton>());
- this.btn_dic_.Add("夜伽", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/夜伽", false).GetComponent<UIButton>());
- this.btn_dic_.Add("キャンセル", UTY.GetChildObject(base.root_obj, "Cancel", false).GetComponent<UIButton>());
- if (DailyMgr.IsLegacy)
- {
- this.btn_dic_.Add("VIP", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/VIP", false).GetComponent<UIButton>());
- }
- else
- {
- this.btn_dic_.Add("VIP", UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton/VIP_HEvent", false).GetComponent<UIButton>());
- }
- UILabel component = UTY.GetChildObject(base.root_obj, "Menu/ExplanatoryText/Value", false).GetComponent<UILabel>();
- Localize component2 = component.GetComponent<Localize>();
- component.text = "回想のジャンルを選択してください。";
- if (component2 != null)
- {
- component2.SetTerm("SceneFreeModeSelect/回想のジャンルを選択してください。");
- }
- foreach (KeyValuePair<string, UIButton> keyValuePair in this.btn_dic_)
- {
- EventDelegate eventDelegate = new EventDelegate(this, "OnClickEvent");
- EventDelegate.Parameter[] parameters = eventDelegate.parameters;
- parameters[0].value = keyValuePair.Key;
- EventDelegate.Add(keyValuePair.Value.onClick, eventDelegate);
- }
- UTY.GetChildObject(base.root_obj, "Menu/FreeModeMenuButton", false).GetComponent<UIGrid>().repositionNow = true;
- }
- protected override void OnCall()
- {
- }
- private void OnClickEvent(string type_name)
- {
- if (type_name != null)
- {
- if (!(type_name == "ストーリー"))
- {
- if (!(type_name == "日常"))
- {
- if (!(type_name == "VIP"))
- {
- if (!(type_name == "夜伽"))
- {
- if (type_name == "キャンセル")
- {
- this.free_mode_select_mgr_.CallCharaSelect();
- }
- }
- else
- {
- this.free_mode_select_mgr_.CallYotogiMode();
- }
- }
- else
- {
- this.free_mode_select_mgr_.CallVipMode();
- }
- }
- else
- {
- this.free_mode_select_mgr_.CallEverydayMode();
- }
- }
- else
- {
- this.free_mode_select_mgr_.CallStoryMode();
- }
- }
- }
- private Dictionary<string, UIButton> btn_dic_ = new Dictionary<string, UIButton>();
- private SceneFreeModeSelectManager free_mode_select_mgr_;
- }
|