1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Warn when creating a script with the same name as the parent class

This commit is contained in:
Aaron Franke
2020-09-29 01:31:41 -04:00
parent f96392a2b5
commit 5a9037f828
2 changed files with 23 additions and 7 deletions

View File

@@ -50,6 +50,7 @@ class ScriptCreateDialog : public ConfirmationDialog {
Label *error_label;
Label *path_error_label;
Label *builtin_warning_label;
Label *script_name_warning_label;
PanelContainer *status_panel;
LineEdit *parent_name;
Button *parent_browse_button;
@@ -110,6 +111,7 @@ class ScriptCreateDialog : public ConfirmationDialog {
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);
String _get_class_name() const;
void _class_name_changed(const String &p_name);
void _parent_name_changed(const String &p_parent);
void _template_changed(int p_template = 0);