|
@@ -36,10 +36,13 @@ namespace GFGGame
|
|
|
_ui.m_listNotice.itemRenderer = ListNoticeItemRender;
|
|
|
|
|
|
_ui.m_c1.onChanged.Add(OnCtrlChange);
|
|
|
+
|
|
|
+ }
|
|
|
+ protected override void AddEventListener()
|
|
|
+ {
|
|
|
EventAgent.AddEventListener(ConstMessage.NOTICE_SYSTOM_ADD, OnCtrlChange);
|
|
|
EventAgent.AddEventListener(ConstMessage.NOTICE_SYSTOM_REMOVE, OnCtrlChange);
|
|
|
}
|
|
|
-
|
|
|
protected override void OnShown()
|
|
|
{
|
|
|
base.OnShown();
|
|
@@ -53,6 +56,11 @@ namespace GFGGame
|
|
|
{
|
|
|
base.OnHide();
|
|
|
}
|
|
|
+ protected override void RemoveEventListener()
|
|
|
+ {
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.NOTICE_SYSTOM_ADD, OnCtrlChange);
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.NOTICE_SYSTOM_REMOVE, OnCtrlChange);
|
|
|
+ }
|
|
|
private void OnCtrlChange()
|
|
|
{
|
|
|
if (_ui.m_c1.selectedIndex == 0)
|
|
@@ -72,6 +80,7 @@ namespace GFGGame
|
|
|
UI_ListActivityItem item = UI_ListActivityItem.Proxy(obj);
|
|
|
item.m_loaShow.url = ResPathUtil.GetActivityPath("");
|
|
|
item.target.data = index;
|
|
|
+ UI_ListActivityItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
|
private void OnListActivityClick(EventContext context)
|
|
@@ -96,6 +105,7 @@ namespace GFGGame
|
|
|
item.m_btnGo.onClick.Add(OnListNoticeBtnGoClick);
|
|
|
}
|
|
|
item.m_btnGo.data = noticeInfo;
|
|
|
+ UI_ListNoticeItem.ProxyEnd();
|
|
|
}
|
|
|
private async void OnListNoticeBtnGoClick(EventContext context)
|
|
|
{
|