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); // } }
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); // } }