added serialzed dictionary

This commit is contained in:
Sebastian Bularca
2026-03-19 22:20:34 +01:00
parent fedd1961a0
commit 9ec4c75ce2
129 changed files with 4088 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using static AYellowpaper.SerializedCollections.Editor.SerializedDictionaryDrawer;
namespace AYellowpaper.SerializedCollections.Editor.States
{
internal abstract class ListState
{
public abstract int ListSize { get; }
public virtual string NoElementsText => "List is Empty.";
public readonly SerializedDictionaryInstanceDrawer Drawer;
public ListState(SerializedDictionaryInstanceDrawer serializedDictionaryDrawer)
{
Drawer = serializedDictionaryDrawer;
}
public abstract SerializedProperty GetPropertyAtIndex(int index);
public abstract ListState OnUpdate();
public abstract void OnEnter();
public abstract void OnExit();
public abstract void DrawElement(Rect rect, SerializedProperty property, DisplayType displayType);
public abstract void RemoveElementAt(int index);
public abstract void InserElementAt(int index);
public virtual float GetHeightAtIndex(int index, bool drawKeyAsList, bool drawValueAsList)
{
return SerializedDictionaryInstanceDrawer.CalculateHeightOfElement(GetPropertyAtIndex(index), drawKeyAsList, drawValueAsList);
}
}
}