Arrays now parse the hint_string in the new inspector.

Also, if a hint_string is given, when changing the size of an Array the new elements are initialized to the default value of that type hint.
This commit is contained in:
MrCdK
2018-12-03 04:41:18 +01:00
parent 8dd00ed176
commit 9c91cc00ea
3 changed files with 52 additions and 188 deletions

View File

@ -3096,7 +3096,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
} break;
case Variant::ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::ARRAY);
editor->setup(Variant::ARRAY, p_hint_text);
add_property_editor(p_path, editor);
} break;
case Variant::POOL_BYTE_ARRAY: {