TravelGuideView.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System.Collections.Generic;
  2. using FairyGUI;
  3. using UI.FieldGuide;
  4. namespace GFGGame
  5. {
  6. public class TravelGuideView : BaseWindow
  7. {
  8. private UI_TravelGuideUI _ui;
  9. public override void Dispose()
  10. {
  11. if (_ui != null)
  12. {
  13. _ui.Dispose();
  14. _ui = null;
  15. }
  16. base.Dispose();
  17. }
  18. protected override void OnInit()
  19. {
  20. base.OnInit();
  21. packageName = UI_TravelGuideUI.PACKAGE_NAME;
  22. _ui = UI_TravelGuideUI.Create();
  23. this.viewCom = _ui.target;
  24. isfullScreen = true;
  25. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  26. _ui.m_list.itemRenderer = RenderListItem;
  27. _ui.m_list.onClickItem.Add(OnListItemClick);
  28. _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("hc_bj_1");
  29. }
  30. protected override void AddEventListener()
  31. {
  32. base.AddEventListener();
  33. }
  34. protected override void OnShown()
  35. {
  36. base.OnShown();
  37. }
  38. protected override void OnHide()
  39. {
  40. base.OnHide();
  41. }
  42. protected override void RemoveEventListener()
  43. {
  44. base.RemoveEventListener();
  45. }
  46. private void OnClickBtnBack()
  47. {
  48. ViewManager.GoBackFrom(typeof(TravelGuideView).FullName);
  49. }
  50. private void RenderListItem(int index, GObject obj)
  51. {
  52. }
  53. private void OnListItemClick(EventContext context)
  54. {
  55. }
  56. }
  57. }