mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
GDScript: Add debug/gdscript/warnings/directory_rules project setting
This commit is contained in:
parent
8327dfa215
commit
1bd7b99182
10 changed files with 222 additions and 96 deletions
|
|
@ -131,6 +131,9 @@ void PluginConfigDialog::_on_required_text_changed() {
|
|||
if ((!script_edit->get_text().get_extension().is_empty() && script_edit->get_text().get_extension() != ext) || script_edit->get_text().ends_with(".")) {
|
||||
validation_panel->set_message(MSG_ID_SCRIPT, vformat(TTR("Script extension must match chosen language extension (.%s)."), ext), EditorValidationPanel::MSG_ERROR);
|
||||
}
|
||||
if (language->get_name() == "GDScript") {
|
||||
validation_panel->set_message(MSG_ID_ENABLE_WARNINGS, TTR("Consider enabling GDScript warnings for this plugin by adding an entry for it to the project setting Debug > GDScript > Warnings > Directory Rules."), EditorValidationPanel::MSG_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
String PluginConfigDialog::_get_subfolder() {
|
||||
|
|
@ -317,6 +320,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
validation_panel->add_line(MSG_ID_SCRIPT, TTR("Script extension is valid."));
|
||||
validation_panel->add_line(MSG_ID_SUBFOLDER, TTR("Subfolder name is valid."));
|
||||
validation_panel->add_line(MSG_ID_ACTIVE, "");
|
||||
validation_panel->add_line(MSG_ID_ENABLE_WARNINGS, "");
|
||||
validation_panel->set_update_callback(callable_mp(this, &PluginConfigDialog::_on_required_text_changed));
|
||||
validation_panel->set_accept_button(get_ok_button());
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class PluginConfigDialog : public ConfirmationDialog {
|
|||
MSG_ID_SUBFOLDER,
|
||||
MSG_ID_SCRIPT,
|
||||
MSG_ID_ACTIVE,
|
||||
MSG_ID_ENABLE_WARNINGS,
|
||||
};
|
||||
|
||||
LineEdit *name_edit = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue