void Awake() { txtField.SetCommitDelegate(MyCommitDelegate); UISystem.Instance.AddHollowWindow(list.gameObject); list.AddInputDelegate(scrollListInputDelegate); listSlider.AddInputDelegate(scrollListInputDelegate); for (int i = 0; i < talkChannelMenu.Count; i++) { mChannelMenuPos.Add(talkChannelMenu[i].gameObject.transform.localPosition); } channelMenus.SetActiveRecursively(false); CEventSystem.Instance.RegisterEventHandle(GAME_EVENT_ID.GE_UI_INFOS, HandelUIInfos); CEventSystem.Instance.RegisterEventHandle(GAME_EVENT_ID.GE_CHAT_MESSAGE, OnEvent); CEventSystem.Instance.RegisterEventHandle(GAME_EVENT_ID.GE_PLAYER_ENTER_WORLD, OnEvent); }
internal void AddHollowWindow(GameObject window) { if (window == null) { return; } UIScrollList list = window.GetComponentInChildren <UIScrollList>(); if (list != null) { list.AddInputDelegate(HollowWindowInput); } AutoSpriteControlBase baseControl = window.GetComponentInChildren <AutoSpriteControlBase>(); if (baseControl != null) { baseControl.AddInputDelegate(HollowWindowInput); } }