示例#1
0
 internal virtual void OnReorder(ReorderableList list)
 {
     if (_itemSelected)
     {
         EntryData.OnComponentChanged(ListChangeType.Reorder, _reorderSelectedIndex, list.index);
         _itemSelected = false;
     }
 }
示例#2
0
 internal virtual void OnAdd(IList <EntryComponent> list, BetterGenericMenu betterGenericMenu)
 {
     InitializeAddButtonGenerucMenu(betterGenericMenu, type =>
     {
         list.Add(CreateNewComponent(type));
         EntryData.OnComponentChanged(ListChangeType.Add, list.Count - 1, -1);
     });
 }
示例#3
0
    internal virtual void OnDuplicate(IList <EntryComponent> entryComponents, int i)
    {
        entryComponents.Insert(i + 1, null);
        entryComponents[i + 1]                     = entryComponents[i].Clone() as EntryComponent;
        entryComponents[i + 1].FieldName           = EntryData.GetNextAvailableName();
        entryComponents[i + 1].OnEditModeModified += () =>
        {
            EntryData.ValidateFieldName(entryComponents[i + 1]);
            OnDataChanged(entryComponents[i + 1]);
        };

        EntryData.OnComponentChanged(ListChangeType.Duplicate, i, -1);
    }
示例#4
0
    internal virtual void OnDataChanged(EntryComponent data)
    {
        var index = EntryData.Componets.IndexOf(data);

        EntryData.OnComponentChanged(ListChangeType.DataChanged, index, -1);
    }
示例#5
0
 internal virtual void OnRemove(IList <EntryComponent> entryComponents, int i)
 {
     AssetsPath.DestroyAsset(entryComponents[i]);
     entryComponents.RemoveAt(i);
     EntryData.OnComponentChanged(ListChangeType.Remove, i, -1);
 }