diff --git a/SHADE_Managed/src/Editor/Editor.cxx b/SHADE_Managed/src/Editor/Editor.cxx index 54200c1e..d5ef3005 100644 --- a/SHADE_Managed/src/Editor/Editor.cxx +++ b/SHADE_Managed/src/Editor/Editor.cxx @@ -302,6 +302,29 @@ namespace SHADE registerUndoAction(object, field, newVal, gameObj); } } + // Any List + else if (field->FieldType->IsGenericType && field->FieldType->GetGenericTypeDefinition() == System::Collections::Generic::List::typeid->GetGenericTypeDefinition()) + { + System::Type^ listType = field->FieldType->GenericTypeArguments[0]; + System::Collections::IEnumerable^ listEnummerable = safe_cast(field->GetValue(object)); + + + SHEditorUI::Text(Convert::ToNative(field->Name)); + SHEditorUI::SameLine(); + SHEditorUI::Button("+"); + + SHEditorUI::Indent(); + int i = 0; + for each (System::Object^ obj in listEnummerable) + { + int val = safe_cast(obj); + SHEditorUI::InputInt(std::to_string(i), val, &isHovered); + SHEditorUI::SameLine(); + SHEditorUI::Button("-"); + ++i; + } + SHEditorUI::Unindent(); + } else { array^ interfaces = field->FieldType->GetInterfaces();