public void SetTabIndex(EventBase evt) { CropsModule module = ModuleManager.Instance.FindModule <CropsModule>(); if (module == null) { return; } int index = module.GetTabIndex(); if (index < 0 || index >= mTabIndex.Count) { return; } UIToggle tg = mTabIndex[index].GetComponent <UIToggle>(); if (tg == null) { return; } tg.value = true; module.SetTabIndex(0, false); }
protected override void OnOpen(object param = null) { CropsModule cropsm = ModuleManager.Instance.FindModule <CropsModule>(); if (null == cropsm) { return; } cropsm.SetTabIndex(0); InitUI(); }