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:
@ -93,6 +93,9 @@ class EditorPropertyArray : public EditorProperty {
|
||||
EditorSpinSlider *page;
|
||||
HBoxContainer *page_hb;
|
||||
Variant::Type array_type;
|
||||
Variant::Type subtype;
|
||||
PropertyHint subtype_hint;
|
||||
String subtype_hint_string;
|
||||
|
||||
void _page_changed(double p_page);
|
||||
void _length_changed(double p_page);
|
||||
@ -108,7 +111,7 @@ protected:
|
||||
void _notification(int p_what);
|
||||
|
||||
public:
|
||||
void setup(Variant::Type p_array_type);
|
||||
void setup(Variant::Type p_array_type, const String &p_hint_string = "");
|
||||
virtual void update_property();
|
||||
EditorPropertyArray();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user