示例#1
0
        public void InitExample(ExampleId exampleId)
        {
            _topMenu = _uiManager.CreateUIMediator <TopMenuMediator>();
            _topMenu.SetExampleId(exampleId);

            switch (exampleId)
            {
            case ExampleId.Popup:
                _example = _popUpManager.ShowPopUp <ExamplePopupMediator>();
                break;

            case ExampleId.Tabs:
                _example = _uiManager.CreateUIMediator <ExampleTabPanelMediator>("TabPanel/");
                break;

            case ExampleId.List:
                _example = _uiManager.CreateUIMediator <ExampleListPanelMediator>("ListPanel/");
                break;

            case ExampleId.VirtualList:
                _example = _uiManager.CreateUIMediator <ExampleVirtualListPanelMediator>("VirtualListPanel/");
                break;

            default:
                throw new ArgumentOutOfRangeException("exampleId", exampleId, null);
            }
        }
示例#2
0
        public T ShowPopUp <T>(string customPath = "", ViewInitData data = null) where T : IPopupMediator, new()
        {
            var popup = UI.CreateUIMediator <T>(ViewSettings.PopupParent, SUBFOLDER_POPUPS + customPath, data);

            _popups.Add(popup);
            return(popup);
        }
        protected override ITabMediator GetMediatorForContent(GameObject tabContentView, int tabIndex)
        {
            var mediator = _uiManager.CreateUIMediator <ExampleTabMediator>(tabContentView, View.ContentsParent);

            mediator.SetTabIndex(tabIndex);
            return(mediator);
        }
示例#4
0
        public override void In()
        {
            base.In();

            _menuPanelList = _uiManager.CreateUIMediator <MenuPanelMediator>(MENU_UI_ROOT);
            _menuPanelList.SetData(_menuModel.GetMenuData());
            _menuPanelList.EventBus.AddListener <ListItemClickedEvent>(MenuItemClickedHandler);
        }