FullInspector.Rotorz.ReorderableList.ReorderableListControl.InsertItem C# (CSharp) Method

InsertItem() protected method

Insert item at specified index and raises the event .
protected InsertItem ( IReorderableListAdaptor adaptor, int itemIndex ) : void
adaptor IReorderableListAdaptor Reorderable list adaptor.
itemIndex int Zero-based index of item.
return void
        protected void InsertItem(IReorderableListAdaptor adaptor, int itemIndex)
        {
            adaptor.Insert(itemIndex);
            AutoFocusItem(s_ContextControlID, itemIndex);

            GUI.changed = true;
            ReorderableListGUI.indexOfChangedItem = -1;

            var args = new ItemInsertedEventArgs(adaptor, itemIndex, false);
            OnItemInserted(args);
        }