void DrawActionButtonArrayElement(SP dialog, int elementIndex)
{
DrawArrayElement(dialog, elementIndex, "Consent dialog should have at least 1 button.", MinActionButtonsCount,
() => SelectedButtonIndex,
param => SelectedButtonIndex = param,
obj =>
{
var title = obj.FindPropertyRelative("title");
EditorGUI.indentLevel++;
string key = obj.propertyPath;
if (!privacyFoldoutStates.ContainsKey(key))
{
privacyFoldoutStates.Add(key, false);
}
string titleValue = !string.IsNullOrEmpty(title.stringValue) ? title.stringValue : "[Untitled Button]";
privacyFoldoutStates[key] = EGL.Foldout(privacyFoldoutStates[key], titleValue, true);
EditorGUI.indentLevel--;
if (privacyFoldoutStates[key])
{
EGL.PropertyField(obj.FindPropertyRelative("id"));
EGL.PropertyField(title);
EGL.PropertyField(obj.FindPropertyRelative("interactable"));
EGL.PropertyField(obj.FindPropertyRelative("titleColor"));
EGL.PropertyField(obj.FindPropertyRelative("backgroundColor"));
EGL.PropertyField(obj.FindPropertyRelative("uninteractableTitleColor"));
EGL.PropertyField(obj.FindPropertyRelative("uninteractableBackgroundColor"));
}
});
}