summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-12 17:24:36 +0100
committerGitHub <noreply@github.com>2019-02-12 17:24:36 +0100
commit385ab23672499b90338ac96f172986c09b128f66 (patch)
treee80c8dde700ba3c0d3bd922ace0ceefb1fee099d
parentc4835c434502e23148585324a16c2bdc1c943ca2 (diff)
parent32b9aedd88c5b527a813659c8c4e7502da9356d0 (diff)
Merge pull request #25823 from merumelu/plugin-config-dialog
PluginConfigDialog: Slight usability changes
-rw-r--r--editor/plugin_config_dialog.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 88672bdf34..12bf544357 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -120,6 +120,10 @@ void PluginConfigDialog::_notification(int p_what) {
connect("confirmed", this, "_on_confirmed");
get_cancel()->connect("pressed", this, "_on_cancelled");
} break;
+
+ case NOTIFICATION_POST_POPUP: {
+ name_edit->grab_focus();
+ } break;
}
}
@@ -215,11 +219,15 @@ PluginConfigDialog::PluginConfigDialog() {
grid->add_child(script_option_lb);
script_option_edit = memnew(OptionButton);
+ int default_lang = 0;
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
ScriptLanguage *lang = ScriptServer::get_language(i);
script_option_edit->add_item(lang->get_name());
+ if (lang == GDScriptLanguage::get_singleton()) {
+ default_lang = i;
+ }
}
- script_option_edit->select(0);
+ script_option_edit->select(default_lang);
grid->add_child(script_option_edit);
Label *script_lb = memnew(Label);