protected override void PreprocessComponent(Component comp) { UITabHandler h = comp as UITabHandler; if (h.tabs.IsNotEmpty()) { foreach (var t in h.tabs) { t.uiRoot.SetActiveEx(false); } } }
public UITabHandlerInspectorImpl(UITabHandler handler) { this.tabHandler = handler; tabArrInspector = new UITabArrInspector(tabHandler, "tabs", true); tabPrefabArrInspector = new UITabArrInspector(tabHandler, "tabPrefabs", false); tabPrefabArrInspector.selectTab = false; tabButtonArrInspector = new ObjReorderList <UIButton>(tabHandler, "tabButtons"); bool auto = false; // if (auto) { // tabButtonArrInspector.drawer.onAddCallback += // tabArrInspector.AddItemAddCallback(OnTabChanged); // tabArrInspector.AddItemChangeCallback(OnTabChanged); // tabArrInspector.AddItemRemoveCallback(OnTabRemoved); // } }
void OnEnable() { inspector = new UIWindowInspectorImpl(target as UIWindow); UIWindow win = target as UIWindow; PopupBase popup = win.GetComponent <PopupBase>(); if (popup != null) { UITabHandler tab = popup.GetComponentInChildrenEx <UITabHandler>(); if (tab != null) { popup.tabs = tab; CompatibilityEditor.SetDirty(popup); } } }
public UITabHandlerInspectorImpl(UITabHandler handler) { this.tabHandler = handler; tabArrInspector = new UITabArrInspector(tabHandler, "tabs", true); tabPrefabArrInspector = new UITabArrInspector(tabHandler, "tabPrefabs", false); tabPrefabArrInspector.selectTab = false; tabButtonArrInspector = new ArrayDrawer <UIButton>(tabHandler, "tabButtons"); bool auto = false; if (auto) { tabArrInspector.AddItemAddCallback(OnTabChanged); tabArrInspector.AddItemChangeCallback(OnTabChanged); tabArrInspector.AddItemRemoveCallback(OnTabRemoved); } }
public UITabHandlerInspectorImpl(UITabHandler handler) { var sObj = new SerializedObject(handler); this.tabHandler = handler; tabArrInspector = new UITabArrInspector(tabHandler, "tabs", true); tabPrefabArrInspector = new UITabArrInspector(tabHandler, "tabPrefabs", false); tabPrefabArrInspector.selectTab = false; tabButtonArrInspector = new ReorderableList(sObj, sObj.FindProperty("tabButtons")); bool auto = false; // if (auto) { // tabButtonArrInspector.drawer.onAddCallback += // tabArrInspector.AddItemAddCallback(OnTabChanged); // tabArrInspector.AddItemChangeCallback(OnTabChanged); // tabArrInspector.AddItemRemoveCallback(OnTabRemoved); // } }
public UITabArrInspector(UITabHandler handler, string varName, bool allowSceneObj) : base(handler, varName, allowSceneObj) { this.tabHandler = handler; this.SetTitle(varName); AddItemChangeCallback(OnItemChange); }