changed directory structure

This commit is contained in:
Sebastian Bularca
2026-04-02 07:22:33 +02:00
parent 101a7ae81a
commit 81b8eadaf1
323 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,55 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using static AYellowpaper.SerializedCollections.Editor.SerializedDictionaryDrawer;
namespace AYellowpaper.SerializedCollections.Editor.States
{
internal class DefaultListState : ListState
{
public override int ListSize => Drawer.ListProperty.minArraySize;
public DefaultListState(SerializedDictionaryInstanceDrawer serializedDictionaryDrawer) : base(serializedDictionaryDrawer)
{
}
public override void OnEnter()
{
Drawer.ReorderableList.draggable = true;
}
public override void OnExit()
{
}
public override ListState OnUpdate()
{
if (Drawer.SearchText.Length > 0)
return Drawer.SearchState;
return this;
}
public override void DrawElement(Rect rect, SerializedProperty property, DisplayType displayType)
{
SerializedDictionaryInstanceDrawer.DrawElement(rect, property, displayType);
}
public override SerializedProperty GetPropertyAtIndex(int index)
{
return Drawer.ListProperty.GetArrayElementAtIndex(index);
}
public override void RemoveElementAt(int index)
{
Drawer.ListProperty.DeleteArrayElementAtIndex(index);
}
public override void InserElementAt(int index)
{
Drawer.ListProperty.InsertArrayElementAtIndex(index);
Drawer.ListProperty.serializedObject.ApplyModifiedProperties();
}
}
}