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

Initial editor accessibility.

This commit is contained in:
Pāvels Nadtočajevs
2025-03-21 09:55:22 +02:00
parent 4310cb82b8
commit 302fa831cc
137 changed files with 1544 additions and 93 deletions

View File

@@ -224,6 +224,7 @@ PluginConfigDialog::PluginConfigDialog() {
name_edit = memnew(LineEdit);
name_edit->set_placeholder("MyPlugin");
name_edit->set_tooltip_text(TTR("Required. This name will be displayed in the list of plugins."));
name_edit->set_accessibility_name(TTRC("Name"));
name_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(name_edit);
@@ -237,6 +238,7 @@ PluginConfigDialog::PluginConfigDialog() {
subfolder_edit = memnew(LineEdit);
subfolder_edit->set_placeholder("\"my_plugin\" -> res://addons/my_plugin");
subfolder_edit->set_tooltip_text(TTR("Optional. The folder name should generally use `snake_case` naming (avoid spaces and special characters).\nIf left empty, the folder will be named after the plugin name converted to `snake_case`."));
subfolder_edit->set_accessibility_name(TTRC("Subfolder"));
subfolder_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(subfolder_edit);
plugin_edit_hidden_controls.push_back(subfolder_edit);
@@ -249,6 +251,7 @@ PluginConfigDialog::PluginConfigDialog() {
desc_edit = memnew(TextEdit);
desc_edit->set_tooltip_text(TTR("Optional. This description should be kept relatively short (up to 5 lines).\nIt will display when hovering the plugin in the list of plugins."));
desc_edit->set_accessibility_name(TTRC("Description"));
desc_edit->set_custom_minimum_size(Size2(400, 80) * EDSCALE);
desc_edit->set_line_wrapping_mode(TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY);
desc_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -263,6 +266,7 @@ PluginConfigDialog::PluginConfigDialog() {
author_edit = memnew(LineEdit);
author_edit->set_placeholder("Godette");
author_edit->set_accessibility_name(TTRC("Author"));
author_edit->set_tooltip_text(TTR("Optional. The author's username, full name, or organization name."));
author_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(author_edit);
@@ -276,6 +280,7 @@ PluginConfigDialog::PluginConfigDialog() {
version_edit = memnew(LineEdit);
version_edit->set_tooltip_text(TTR("Optional. A human-readable version identifier used for informational purposes only."));
version_edit->set_placeholder("1.0");
version_edit->set_accessibility_name(TTRC("Version"));
version_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(version_edit);
@@ -287,6 +292,7 @@ PluginConfigDialog::PluginConfigDialog() {
script_option_edit = memnew(OptionButton);
script_option_edit->set_tooltip_text(TTR("Required. The scripting language to use for the script.\nNote that a plugin may use several languages at once by adding more scripts to the plugin."));
script_option_edit->set_accessibility_name(TTRC("Scripting Language"));
int default_lang = 0;
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
ScriptLanguage *lang = ScriptServer::get_language(i);
@@ -307,6 +313,7 @@ PluginConfigDialog::PluginConfigDialog() {
script_edit = memnew(LineEdit);
script_edit->set_tooltip_text(TTR("Optional. The name of the script file. If left empty, will default to the subfolder name."));
script_edit->set_placeholder("\"plugin.gd\" -> res://addons/my_plugin/plugin.gd");
script_edit->set_accessibility_name(TTRC("Script"));
script_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(script_edit);
@@ -319,6 +326,7 @@ PluginConfigDialog::PluginConfigDialog() {
active_edit = memnew(CheckBox);
active_edit->set_pressed(true);
active_edit->set_accessibility_name(TTRC("Active"));
grid->add_child(active_edit);
plugin_edit_hidden_controls.push_back(active_edit);