public void OnSelectTab(QuestDetailTabContext _tab) { if (m_IsReady == false) { return; } if (ServerApi.IsExists) { return; } if (ButtonBlocker.Instance.IsActive()) { return; } ButtonBlocker.Instance.Block(); tabIndex = _tab.m_Index; ChengeTabIndex(); DidTabChenged(_tab); }
private void ChengeTab(QuestDetailTabContext _tab) { switch (questDetailTab.currentIndex) { case 0: UnityUtil.SetObjectEnabledOnce(questDetailInfo.gameObject, true); UnityUtil.SetObjectEnabledOnce(questDetailMessage.gameObject, false); UnityUtil.SetObjectEnabledOnce(questDetailMission.gameObject, false); break; case 1: UnityUtil.SetObjectEnabledOnce(questDetailInfo.gameObject, false); UnityUtil.SetObjectEnabledOnce(questDetailMessage.gameObject, true); UnityUtil.SetObjectEnabledOnce(questDetailMission.gameObject, false); break; case 2: UnityUtil.SetObjectEnabledOnce(questDetailInfo.gameObject, false); UnityUtil.SetObjectEnabledOnce(questDetailMessage.gameObject, false); UnityUtil.SetObjectEnabledOnce(questDetailMission.gameObject, true); break; } }
public void AddTab(string _title, QuestDetailModel.TabType _type) { int _index = TabList.Count; var model = new QuestDetailTabModel((uint)_index); model.OnShowedNext += () => { if (_index + 1 >= m_tabs.Count) { return; } m_tabs[_index + 1].Appear(); }; QuestDetailTabContext newTab = new QuestDetailTabContext(model); newTab.TitleOn = string.Format(GameTextUtil.GetText("stmina_bahutext"), _title); newTab.TitleOff = _title; newTab.m_Type = _type; newTab.m_Index = _index; newTab.DidSelectTab += OnSelectTab; if (_index == tabIndex) { newTab.IsSelected = true; } else { newTab.IsSelected = false; } TabList.Add(newTab); tabMax = TabList.Count; m_tabs.Add(model); }