Fix script create dialog

- Correctly validate parent/class names
- Trigger parent validation when selecting from buttons
- Fix enabling/disabling parent buttons
- Clear class name if not supported
- Minor cleanup
This commit is contained in:
James Buck 2019-06-11 16:05:24 -05:00
parent abbbde87e2
commit 2d28e393d6
2 changed files with 28 additions and 37 deletions

View file

@ -87,7 +87,8 @@ class ScriptCreateDialog : public ConfirmationDialog {
void _path_entered(const String &p_path = String());
void _lang_changed(int l = 0);
void _built_in_pressed();
bool _validate(const String &p_string);
bool _validate_parent(const String &p_string);
bool _validate_class(const String &p_string);
String _validate_path(const String &p_path, bool p_file_must_exist);
void _class_name_changed(const String &p_name);
void _parent_name_changed(const String &p_parent);