Selectively apply FOCUS_ACCESSIBILITY to the Labels instead of setting it by default.
This commit is contained in:
parent
1696ab0cb6
commit
5b49fd4207
84 changed files with 159 additions and 14 deletions
|
|
@ -58,7 +58,6 @@
|
|||
<member name="ellipsis_char" type="String" setter="set_ellipsis_char" getter="get_ellipsis_char" default=""…"">
|
||||
Ellipsis character used for text clipping.
|
||||
</member>
|
||||
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="3" />
|
||||
<member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
|
||||
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
|
||||
</member>
|
||||
|
|
|
|||
|
|
@ -7602,6 +7602,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
timeline_vbox->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
info_message = memnew(Label);
|
||||
info_message->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
info_message->set_text(TTR("Select an AnimationPlayer node to create and edit animations."));
|
||||
info_message->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
|
||||
info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
@ -7768,6 +7769,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
fps_compat->connect(SceneStringName(toggled), callable_mp(this, &AnimationTrackEditor::_update_fps_compat_mode));
|
||||
|
||||
nearest_fps_label = memnew(Label);
|
||||
nearest_fps_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
nearest_fps_label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
bottom_hf->add_child(nearest_fps_label);
|
||||
|
||||
|
|
@ -7890,6 +7892,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
|||
VBoxContainer *icvb = memnew(VBoxContainer);
|
||||
insert_confirm->add_child(icvb);
|
||||
insert_confirm_text = memnew(Label);
|
||||
insert_confirm_text->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
icvb->add_child(insert_confirm_text);
|
||||
HBoxContainer *ichb = memnew(HBoxContainer);
|
||||
icvb->add_child(ichb);
|
||||
|
|
@ -9198,6 +9201,7 @@ AnimationMarkerEdit::AnimationMarkerEdit() {
|
|||
marker_rename_new_name_label->set_text(TTR("Change Marker Name:"));
|
||||
marker_rename_vbox->add_child(marker_rename_new_name_label);
|
||||
marker_rename_new_name = memnew(LineEdit);
|
||||
marker_rename_new_name->set_accessibility_name(TTRC("Change Marker Name"));
|
||||
marker_rename_new_name->connect(SceneStringName(text_changed), callable_mp(this, &AnimationMarkerEdit::_marker_rename_new_name_changed));
|
||||
marker_rename_confirm->register_text_enter(marker_rename_new_name);
|
||||
marker_rename_vbox->add_child(marker_rename_new_name);
|
||||
|
|
|
|||
|
|
@ -793,6 +793,7 @@ FindReplaceBar::FindReplaceBar() {
|
|||
|
||||
matches_label = memnew(Label);
|
||||
hbc_button_search->add_child(matches_label);
|
||||
matches_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
matches_label->hide();
|
||||
|
||||
find_prev = memnew(Button);
|
||||
|
|
@ -1891,6 +1892,7 @@ CodeTextEditor::CodeTextEditor() {
|
|||
status_bar->add_child(scroll);
|
||||
|
||||
error = memnew(Label);
|
||||
error->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
scroll->add_child(error);
|
||||
error->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
|
||||
error->set_mouse_filter(MOUSE_FILTER_STOP);
|
||||
|
|
@ -1949,6 +1951,7 @@ CodeTextEditor::CodeTextEditor() {
|
|||
line_and_col_txt->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
|
||||
line_and_col_txt->set_tooltip_text(TTR("Line and column numbers."));
|
||||
line_and_col_txt->set_accessibility_name(TTRC("Line and Column Numbers"));
|
||||
line_and_col_txt->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
line_and_col_txt->set_mouse_filter(MOUSE_FILTER_STOP);
|
||||
|
||||
status_bar->add_child(memnew(VSeparator));
|
||||
|
|
@ -1959,6 +1962,7 @@ CodeTextEditor::CodeTextEditor() {
|
|||
indentation_txt->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
|
||||
indentation_txt->set_tooltip_text(TTR("Indentation"));
|
||||
indentation_txt->set_accessibility_name(TTRC("Indentation"));
|
||||
indentation_txt->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
indentation_txt->set_mouse_filter(MOUSE_FILTER_STOP);
|
||||
|
||||
text_editor->connect(SceneStringName(gui_input), callable_mp(this, &CodeTextEditor::_text_editor_gui_input));
|
||||
|
|
|
|||
|
|
@ -771,10 +771,12 @@ ConnectDialog::ConnectDialog() {
|
|||
vbc_left->add_child(tree);
|
||||
|
||||
warning_label = memnew(Label);
|
||||
warning_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
vbc_left->add_child(warning_label);
|
||||
warning_label->hide();
|
||||
|
||||
error_label = memnew(Label);
|
||||
error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
error_label->set_text(TTR("Scene does not contain any script."));
|
||||
vbc_left->add_child(error_label);
|
||||
error_label->hide();
|
||||
|
|
|
|||
|
|
@ -417,6 +417,7 @@ EditorPerformanceProfiler::EditorPerformanceProfiler() {
|
|||
add_child(monitor_draw);
|
||||
|
||||
info_message = memnew(Label);
|
||||
info_message->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
info_message->set_text(TTR("Pick one or more items from the list to display the graph."));
|
||||
info_message->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
|
||||
info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -1944,6 +1944,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
|||
vbc->add_child(hbc);
|
||||
|
||||
reason = memnew(Label);
|
||||
reason->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
reason->set_text("");
|
||||
hbc->add_child(reason);
|
||||
reason->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
|
|
|||
|
|
@ -667,6 +667,7 @@ DependencyRemoveDialog::DependencyRemoveDialog() {
|
|||
add_child(vb);
|
||||
|
||||
text = memnew(Label);
|
||||
text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
vb->add_child(text);
|
||||
|
||||
Label *files_to_delete_label = memnew(Label);
|
||||
|
|
@ -757,6 +758,7 @@ DependencyErrorDialog::DependencyErrorDialog() {
|
|||
set_cancel_button_text(TTR("Close"));
|
||||
|
||||
text = memnew(Label);
|
||||
text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
vb->add_child(text);
|
||||
text->set_text(TTR("Which action should be taken?"));
|
||||
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ DirectoryCreateDialog::DirectoryCreateDialog() {
|
|||
add_child(vb);
|
||||
|
||||
base_path_label = memnew(Label);
|
||||
base_path_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
base_path_label->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
|
||||
vb->add_child(base_path_label);
|
||||
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ ScrollContainer *EditorAbout::_populate_list(const String &p_name, const List<St
|
|||
const char *const *names_ptr = p_src[i];
|
||||
if (*names_ptr) {
|
||||
Label *lbl = memnew(Label);
|
||||
lbl->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
lbl->set_theme_type_variation("HeaderSmall");
|
||||
lbl->set_text(*itr);
|
||||
vbc->add_child(lbl);
|
||||
|
|
@ -196,6 +197,7 @@ EditorAbout::EditorAbout() {
|
|||
version_info_vbc->add_child(memnew(EditorVersionButton(EditorVersionButton::FORMAT_WITH_NAME_AND_BUILD)));
|
||||
|
||||
Label *about_text = memnew(Label);
|
||||
about_text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
about_text->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
about_text->set_text(
|
||||
String::utf8("\xc2\xa9 2014-present ") + TTR("Godot Engine contributors") + "." +
|
||||
|
|
@ -268,6 +270,7 @@ EditorAbout::EditorAbout() {
|
|||
tc->add_child(license_thirdparty);
|
||||
|
||||
Label *tpl_label = memnew(Label);
|
||||
tpl_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
tpl_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
tpl_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
tpl_label->set_text(TTR("Godot Engine relies on a number of third-party free and open source libraries, all compatible with the terms of its MIT license. The following is an exhaustive list of all such third-party components with their respective copyright statements and license terms."));
|
||||
|
|
|
|||
|
|
@ -674,6 +674,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
|
|||
asset_status->add_child(asset_label);
|
||||
|
||||
asset_title_label = memnew(Label);
|
||||
asset_title_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
asset_status->add_child(asset_title_label);
|
||||
|
||||
// File remapping controls.
|
||||
|
|
@ -705,6 +706,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
|
|||
remapping_tools->add_spacer();
|
||||
|
||||
asset_conflicts_label = memnew(Label);
|
||||
asset_conflicts_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
asset_conflicts_label->set_theme_type_variation("HeaderSmall");
|
||||
asset_conflicts_label->set_text(TTR("No files conflict with your project"));
|
||||
remapping_tools->add_child(asset_conflicts_label);
|
||||
|
|
|
|||
|
|
@ -682,6 +682,7 @@ Variant EditorAudioBus::get_drag_data_fw(const Point2 &p_point, Control *p_from)
|
|||
fxd["effect"] = md;
|
||||
|
||||
Label *l = memnew(Label);
|
||||
l->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
l->set_text(item->get_text(0));
|
||||
l->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
effects->set_drag_preview(l);
|
||||
|
|
@ -921,6 +922,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
|
|||
audio_value_preview_box->add_child(audioprev_hbc);
|
||||
|
||||
audio_value_preview_label = memnew(Label);
|
||||
audio_value_preview_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
audio_value_preview_label->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
audio_value_preview_label->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
audio_value_preview_label->set_mouse_filter(MOUSE_FILTER_PASS);
|
||||
|
|
|
|||
|
|
@ -890,6 +890,7 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
|
|||
add_child(hbc);
|
||||
|
||||
error_message = memnew(Label);
|
||||
error_message->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
error_message->hide();
|
||||
error_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
||||
error_message->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
|
|
|
|||
|
|
@ -4755,6 +4755,7 @@ FindBar::FindBar() {
|
|||
search_text->connect(SceneStringName(text_submitted), callable_mp(this, &FindBar::_search_text_submitted));
|
||||
|
||||
matches_label = memnew(Label);
|
||||
matches_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
add_child(matches_label);
|
||||
matches_label->hide();
|
||||
|
||||
|
|
|
|||
|
|
@ -1145,6 +1145,7 @@ Variant EditorProperty::get_drag_data(const Point2 &p_point) {
|
|||
dp["value"] = object->get(property);
|
||||
|
||||
Label *drag_label = memnew(Label);
|
||||
drag_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
drag_label->set_text(property);
|
||||
drag_label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Don't translate raw property name.
|
||||
set_drag_preview(drag_label);
|
||||
|
|
@ -3191,6 +3192,7 @@ EditorPaginator::EditorPaginator() {
|
|||
add_child(page_line_edit);
|
||||
|
||||
page_count_label = memnew(Label);
|
||||
page_count_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
add_child(page_count_label);
|
||||
|
||||
next_page_button = memnew(Button);
|
||||
|
|
|
|||
|
|
@ -6013,6 +6013,7 @@ Dictionary EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from
|
|||
Control *drag_control = memnew(Control);
|
||||
TextureRect *drag_preview = memnew(TextureRect);
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
|
||||
Ref<Texture2D> preview;
|
||||
|
|
@ -6066,6 +6067,7 @@ Dictionary EditorNode::drag_files_and_dirs(const Vector<String> &p_paths, Contro
|
|||
HBoxContainer *hbox = memnew(HBoxContainer);
|
||||
TextureRect *icon = memnew(TextureRect);
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
|
||||
if (p_paths[i].ends_with("/")) {
|
||||
|
|
@ -6084,6 +6086,7 @@ Dictionary EditorNode::drag_files_and_dirs(const Vector<String> &p_paths, Contro
|
|||
|
||||
if (p_paths.size() > num_rows) {
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
if (has_file && has_folder) {
|
||||
label->set_text(vformat(TTR("%d more files or folders"), p_paths.size() - num_rows));
|
||||
} else if (has_folder) {
|
||||
|
|
@ -7750,7 +7753,6 @@ EditorNode::EditorNode() {
|
|||
project_title = memnew(Label);
|
||||
project_title->add_theme_font_override(SceneStringName(font), theme->get_font(SNAME("bold"), EditorStringName(EditorFonts)));
|
||||
project_title->add_theme_font_size_override(SceneStringName(font_size), theme->get_font_size(SNAME("bold_size"), EditorStringName(EditorFonts)));
|
||||
project_title->set_focus_mode(Control::FOCUS_NONE);
|
||||
project_title->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
project_title->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
|
||||
project_title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
|
@ -8050,6 +8052,7 @@ EditorNode::EditorNode() {
|
|||
{
|
||||
VBoxContainer *vbox = memnew(VBoxContainer);
|
||||
install_android_build_template_message = memnew(Label);
|
||||
install_android_build_template_message->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
install_android_build_template_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
install_android_build_template_message->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
|
||||
vbox->add_child(install_android_build_template_message);
|
||||
|
|
@ -8138,6 +8141,7 @@ EditorNode::EditorNode() {
|
|||
vbc->add_child(dl);
|
||||
|
||||
disk_changed_list = memnew(Tree);
|
||||
disk_changed_list->set_accessibility_name(TTRC("The following files are newer on disk:"));
|
||||
vbc->add_child(disk_changed_list);
|
||||
disk_changed_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
|
|
|
|||
|
|
@ -929,6 +929,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
|||
restart_icon->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
restart_hb->add_child(restart_icon);
|
||||
restart_label = memnew(Label);
|
||||
restart_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
restart_label->set_text(TTR("The editor must be restarted for changes to take effect."));
|
||||
restart_hb->add_child(restart_label);
|
||||
restart_hb->add_spacer();
|
||||
|
|
|
|||
|
|
@ -990,6 +990,7 @@ ExportTemplateManager::ExportTemplateManager() {
|
|||
current_hb->add_child(current_label);
|
||||
|
||||
current_value = memnew(Label);
|
||||
current_value->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
current_hb->add_child(current_value);
|
||||
|
||||
// Current version statuses.
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ void ProjectExportTextureFormatError::show_for_texture_format(const String &p_fr
|
|||
ProjectExportTextureFormatError::ProjectExportTextureFormatError() {
|
||||
// Set up the label.
|
||||
texture_format_error_label = memnew(Label);
|
||||
texture_format_error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
add_child(texture_format_error_label);
|
||||
// Set up the fix button.
|
||||
fix_texture_format_button = memnew(LinkButton);
|
||||
|
|
@ -764,6 +765,7 @@ Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_
|
|||
tr->set_texture(presets->get_item_icon(pos));
|
||||
drag->add_child(tr);
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_text(presets->get_item_text(pos));
|
||||
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Don't translate user input.
|
||||
drag->add_child(label);
|
||||
|
|
@ -782,6 +784,7 @@ Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_
|
|||
d["patch"] = item_metadata;
|
||||
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_text(item->get_text(0));
|
||||
patches->set_drag_preview(label);
|
||||
|
||||
|
|
@ -1563,6 +1566,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
include_files->connect("custom_popup_edited", callable_mp(this, &ProjectExportDialog::_tree_popup_edited));
|
||||
|
||||
server_strip_message = memnew(Label);
|
||||
server_strip_message->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
server_strip_message->set_visible(false);
|
||||
server_strip_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
server_strip_message->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
|
||||
|
|
@ -1692,6 +1696,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
script_key->set_accessibility_name(TTRC("Encryption Key"));
|
||||
script_key->connect(SceneStringName(text_changed), callable_mp(this, &ProjectExportDialog::_script_encryption_key_changed));
|
||||
script_key_error = memnew(Label);
|
||||
script_key_error->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
script_key_error->set_text(String::utf8("• ") + TTR("Invalid Encryption Key (must be 64 hexadecimal characters long)"));
|
||||
script_key_error->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
sec_vb->add_margin_child(TTR("Encryption Key (256-bits as hexadecimal):"), script_key);
|
||||
|
|
@ -1704,6 +1709,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
sec_vb->add_margin_child(TTR("Initialization vector seed"), seed_input);
|
||||
|
||||
Label *sec_info = memnew(Label);
|
||||
sec_info->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
sec_info->set_text(TTR("Note: Encryption key needs to be stored in the binary,\nyou need to build the export templates from source."));
|
||||
sec_vb->add_child(sec_info);
|
||||
|
||||
|
|
@ -1789,12 +1795,14 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
export_texture_format_error->connect("texture_format_enabled", callable_mp(this, &ProjectExportDialog::_update_current_preset));
|
||||
|
||||
export_error = memnew(Label);
|
||||
export_error->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
main_vb->add_child(export_error);
|
||||
export_error->hide();
|
||||
export_error->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
|
||||
export_error->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
|
||||
export_warning = memnew(Label);
|
||||
export_warning->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
main_vb->add_child(export_warning);
|
||||
export_warning->hide();
|
||||
export_warning->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
|
||||
|
|
@ -1805,6 +1813,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
export_templates_error->hide();
|
||||
|
||||
Label *export_error2 = memnew(Label);
|
||||
export_error2->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
export_templates_error->add_child(export_error2);
|
||||
export_error2->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
|
||||
export_error2->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ FBXImporterManager::FBXImporterManager() {
|
|||
vb->add_child(hb);
|
||||
|
||||
path_status = memnew(Label);
|
||||
path_status->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
vb->add_child(path_status);
|
||||
|
||||
add_child(vb);
|
||||
|
|
|
|||
|
|
@ -593,6 +593,7 @@ FindInFilesPanel::FindInFilesPanel() {
|
|||
hbc->add_child(find_label);
|
||||
|
||||
_search_text_label = memnew(Label);
|
||||
_search_text_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
hbc->add_child(_search_text_label);
|
||||
|
||||
_progress_bar = memnew(ProgressBar);
|
||||
|
|
@ -602,6 +603,7 @@ FindInFilesPanel::FindInFilesPanel() {
|
|||
set_progress_visible(false);
|
||||
|
||||
_status_label = memnew(Label);
|
||||
_status_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
hbc->add_child(_status_label);
|
||||
|
||||
_refresh_button = memnew(Button);
|
||||
|
|
|
|||
|
|
@ -404,6 +404,7 @@ void GroupSettingsEditor::_show_remove_dialog() {
|
|||
|
||||
VBoxContainer *vbox = memnew(VBoxContainer);
|
||||
remove_label = memnew(Label);
|
||||
remove_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
vbox->add_child(remove_label);
|
||||
|
||||
remove_check_box = memnew(CheckBox);
|
||||
|
|
|
|||
|
|
@ -741,6 +741,7 @@ void GroupsEditor::_show_remove_group_dialog() {
|
|||
|
||||
VBoxContainer *vbox = memnew(VBoxContainer);
|
||||
remove_label = memnew(Label);
|
||||
remove_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
vbox->add_child(remove_label);
|
||||
|
||||
remove_check_box = memnew(CheckBox);
|
||||
|
|
|
|||
|
|
@ -2061,7 +2061,6 @@ void EditorFileDialog::_update_option_controls() {
|
|||
} else {
|
||||
Label *lbl = memnew(Label);
|
||||
lbl->set_text(opt.name);
|
||||
lbl->set_focus_mode(Control::FOCUS_NONE);
|
||||
grid_select_options->add_child(lbl);
|
||||
|
||||
OptionButton *ob = memnew(OptionButton);
|
||||
|
|
@ -2428,7 +2427,6 @@ EditorFileDialog::EditorFileDialog() {
|
|||
dir_up->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_go_up));
|
||||
|
||||
Label *l = memnew(Label(TTRC("Path:")));
|
||||
l->set_focus_mode(Control::FOCUS_NONE);
|
||||
l->set_theme_type_variation("HeaderSmall");
|
||||
pathhb->add_child(l);
|
||||
|
||||
|
|
@ -2504,7 +2502,6 @@ EditorFileDialog::EditorFileDialog() {
|
|||
fav_vb->add_child(fav_hb);
|
||||
|
||||
l = memnew(Label(TTRC("Favorites:")));
|
||||
l->set_focus_mode(Control::FOCUS_NONE);
|
||||
l->set_theme_type_variation("HeaderSmall");
|
||||
fav_hb->add_child(l);
|
||||
|
||||
|
|
@ -2555,7 +2552,6 @@ EditorFileDialog::EditorFileDialog() {
|
|||
lower_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
l = memnew(Label(TTRC("Directories & Files:")));
|
||||
l->set_focus_mode(Control::FOCUS_NONE);
|
||||
l->set_theme_type_variation("HeaderSmall");
|
||||
l->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
|
|
@ -2665,7 +2661,6 @@ EditorFileDialog::EditorFileDialog() {
|
|||
file_box = memnew(HBoxContainer);
|
||||
|
||||
l = memnew(Label(TTRC("File:")));
|
||||
l->set_focus_mode(Control::FOCUS_NONE);
|
||||
l->set_theme_type_variation("HeaderSmall");
|
||||
file_box->add_child(l);
|
||||
|
||||
|
|
|
|||
|
|
@ -226,6 +226,7 @@ EditorObjectSelector::EditorObjectSelector(EditorSelectionHistory *p_history) {
|
|||
main_hb->add_child(current_object_icon);
|
||||
|
||||
current_object_label = memnew(Label);
|
||||
current_object_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
current_object_label->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
current_object_label->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
current_object_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@ QuickOpenResultContainer::QuickOpenResultContainer() {
|
|||
panel_container->add_child(no_results_container);
|
||||
|
||||
no_results_label = memnew(Label);
|
||||
no_results_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
no_results_label->add_theme_font_size_override(SceneStringName(font_size), 24 * EDSCALE);
|
||||
no_results_container->add_child(no_results_label);
|
||||
no_results_container->hide();
|
||||
|
|
@ -245,6 +246,7 @@ QuickOpenResultContainer::QuickOpenResultContainer() {
|
|||
{
|
||||
// Selected filepath
|
||||
file_details_path = memnew(Label);
|
||||
file_details_path->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
file_details_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
file_details_path->set_horizontal_alignment(HorizontalAlignment::HORIZONTAL_ALIGNMENT_CENTER);
|
||||
file_details_path->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
|
|
|
|||
|
|
@ -435,6 +435,7 @@ void EditorToaster::_popup_str(const String &p_message, Severity p_severity, con
|
|||
hb->add_theme_constant_override("separation", 0);
|
||||
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
hb->add_child(label);
|
||||
|
||||
Label *count_label = memnew(Label);
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ void EditorValidationPanel::add_line(int p_id, const String &p_valid_message) {
|
|||
ERR_FAIL_COND(valid_messages.has(p_id));
|
||||
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
message_container->add_child(label);
|
||||
label->set_custom_minimum_size(Size2(200 * EDSCALE, 0));
|
||||
label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -2176,6 +2176,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
|
|||
VBoxContainer *vb = memnew(VBoxContainer);
|
||||
revoke_dialog->add_child(vb);
|
||||
revoke_dialog_label = memnew(Label);
|
||||
revoke_dialog_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
vb->add_child(revoke_dialog_label);
|
||||
ask_before_revoke_checkbox = memnew(CheckBox(TTR("Don't Ask Again")));
|
||||
ask_before_revoke_checkbox->set_tooltip_text(TTR("This dialog can also be enabled/disabled in the Editor Settings: Docks > Scene Tree > Ask Before Revoking Unique Name."));
|
||||
|
|
@ -2255,6 +2256,7 @@ void SceneTreeDialog::set_valid_types(const Vector<StringName> &p_valid) {
|
|||
|
||||
Label *label = memnew(Label);
|
||||
hb->add_child(label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_text(name);
|
||||
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1362,6 +1362,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
root_vb->add_child(main_pages);
|
||||
|
||||
label_warn = memnew(Label);
|
||||
label_warn->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label_warn->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
label_warn->set_text("");
|
||||
root_vb->add_child(label_warn);
|
||||
|
|
@ -1374,6 +1375,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
main_pages->add_child(page1_vb);
|
||||
|
||||
page1_description = memnew(Label);
|
||||
page1_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
page1_description->set_text(TTR("Select font rendering options, fallback font, and metadata override:"));
|
||||
page1_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
page1_vb->add_child(page1_description);
|
||||
|
|
@ -1389,6 +1391,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
page1_hb->add_child(page1_lbl_vb);
|
||||
|
||||
font_name_label = memnew(Label);
|
||||
font_name_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
font_name_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
font_name_label->set_clip_text(true);
|
||||
font_name_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
|
@ -1415,6 +1418,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
main_pages->add_child(page2_vb);
|
||||
|
||||
page2_description = memnew(Label);
|
||||
page2_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
page2_description->set_text(TTR("Add font size, and variation coordinates, and select glyphs to pre-render:"));
|
||||
page2_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
page2_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
|
|
@ -1446,6 +1450,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
|
||||
vars_list = memnew(Tree);
|
||||
vars_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
vars_list->set_accessibility_name(TTRC("Configuration"));
|
||||
vars_list->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
|
||||
vars_list->set_hide_root(true);
|
||||
vars_list->set_columns(2);
|
||||
|
|
@ -1477,6 +1482,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
preload_pages_vb->add_child(gl_hb);
|
||||
|
||||
label_glyphs = memnew(Label);
|
||||
label_glyphs->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label_glyphs->set_text(vformat(TTR("Preloaded glyphs: %d"), 0));
|
||||
label_glyphs->set_custom_minimum_size(Size2(50 * EDSCALE, 0));
|
||||
gl_hb->add_child(label_glyphs);
|
||||
|
|
@ -1491,6 +1497,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
preload_pages->add_child(page2_0_vb);
|
||||
|
||||
page2_0_description = memnew(Label);
|
||||
page2_0_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
page2_0_description->set_text(TTR("Select translations to add all required glyphs to pre-render list:"));
|
||||
page2_0_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
page2_0_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
|
|
@ -1524,6 +1531,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
preload_pages->add_child(page2_1_vb);
|
||||
|
||||
page2_1_description = memnew(Label);
|
||||
page2_1_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
page2_1_description->set_text(TTR("Enter a text and select OpenType features to shape and add all required glyphs to pre-render list:"));
|
||||
page2_1_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
page2_1_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
|
|
@ -1562,6 +1570,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
|
|||
preload_pages->add_child(page2_2_vb);
|
||||
|
||||
page2_2_description = memnew(Label);
|
||||
page2_2_description->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
page2_2_description->set_text(TTR("Add or remove glyphs from the character map to pre-render list:\nNote: Some stylistic alternatives and glyph variants do not have one-to-one correspondence to character, and not shown in this map, use \"Glyphs from the text\" tab to add these."));
|
||||
page2_2_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
page2_2_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
|
|
|
|||
|
|
@ -752,6 +752,7 @@ ImportDock::ImportDock() {
|
|||
content->hide();
|
||||
|
||||
imported = memnew(Label);
|
||||
imported->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
imported->add_theme_style_override(CoreStringName(normal), EditorNode::get_singleton()->get_editor_theme()->get_stylebox(CoreStringName(normal), SNAME("LineEdit")));
|
||||
imported->set_clip_text(true);
|
||||
content->add_child(imported);
|
||||
|
|
@ -813,6 +814,7 @@ ImportDock::ImportDock() {
|
|||
params = memnew(ImportDockParameters);
|
||||
|
||||
select_a_resource = memnew(Label);
|
||||
select_a_resource->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
select_a_resource->set_text(TTRC("Select a resource file in the filesystem or in the inspector to adjust import settings."));
|
||||
select_a_resource->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
|
||||
select_a_resource->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
|
||||
|
|
|
|||
|
|
@ -643,6 +643,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
|
|||
add_child(main_vbox);
|
||||
|
||||
event_as_text = memnew(Label);
|
||||
event_as_text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
event_as_text->set_custom_minimum_size(Size2(500, 0) * EDSCALE);
|
||||
event_as_text->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
event_as_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -841,6 +841,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
|||
unique_resources_confirmation->add_child(container);
|
||||
|
||||
unique_resources_label = memnew(Label);
|
||||
unique_resources_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
container->add_child(unique_resources_label);
|
||||
|
||||
unique_resources_list_tree = memnew(Tree);
|
||||
|
|
@ -851,6 +852,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
|
|||
container->add_child(unique_resources_list_tree);
|
||||
|
||||
Label *bottom_label = memnew(Label);
|
||||
bottom_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
bottom_label->set_text(TTRC("This cannot be undone. Are you sure?"));
|
||||
container->add_child(bottom_label);
|
||||
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ NodeDock::NodeDock() {
|
|||
groups->hide();
|
||||
|
||||
select_a_node = memnew(Label);
|
||||
select_a_node->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
select_a_node->set_text(TTRC("Select a single node to edit its signals and groups."));
|
||||
select_a_node->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
|
||||
select_a_node->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
|
|
|||
|
|
@ -805,6 +805,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
add_child(error_panel);
|
||||
|
||||
error_label = memnew(Label);
|
||||
error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
error_panel->add_child(error_label);
|
||||
|
||||
menu = memnew(PopupMenu);
|
||||
|
|
|
|||
|
|
@ -1088,6 +1088,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
error_panel = memnew(PanelContainer);
|
||||
add_child(error_panel);
|
||||
error_label = memnew(Label);
|
||||
error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
error_panel->add_child(error_label);
|
||||
|
||||
set_custom_minimum_size(Size2(0, 300 * EDSCALE));
|
||||
|
|
|
|||
|
|
@ -1222,6 +1222,7 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
|
|||
error_panel = memnew(PanelContainer);
|
||||
add_child(error_panel);
|
||||
error_label = memnew(Label);
|
||||
error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
error_panel->add_child(error_label);
|
||||
error_label->set_text("eh");
|
||||
|
||||
|
|
|
|||
|
|
@ -1861,6 +1861,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
|||
error_panel = memnew(PanelContainer);
|
||||
add_child(error_panel);
|
||||
error_label = memnew(Label);
|
||||
error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
error_panel->add_child(error_label);
|
||||
error_panel->hide();
|
||||
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem(bool p_clickable) {
|
|||
label_margin->set_content_margin_all(0);
|
||||
|
||||
price = memnew(Label);
|
||||
price->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
price->add_theme_style_override(CoreStringName(normal), label_margin);
|
||||
price->set_tooltip_text(TTR("License"));
|
||||
price->set_accessibility_name(TTRC("License"));
|
||||
|
|
@ -579,6 +580,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
|
|||
HBoxContainer *title_hb = memnew(HBoxContainer);
|
||||
vb->add_child(title_hb);
|
||||
title = memnew(Label);
|
||||
title->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
title_hb->add_child(title);
|
||||
title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
|
|
@ -1713,6 +1715,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||
library_vb->add_child(library_message_box);
|
||||
|
||||
library_message = memnew(Label);
|
||||
library_message->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
library_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
library_message_box->add_child(library_message);
|
||||
|
||||
|
|
@ -1746,6 +1749,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||
error_hb = memnew(HBoxContainer);
|
||||
library_main->add_child(error_hb);
|
||||
error_label = memnew(Label);
|
||||
error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
error_hb->add_child(error_label);
|
||||
error_tr = memnew(TextureRect);
|
||||
error_tr->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ BitMapEditor::BitMapEditor() {
|
|||
centering_container->add_child(outline_overlay);
|
||||
|
||||
size_label = memnew(Label);
|
||||
size_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
size_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
||||
add_child(size_label);
|
||||
|
||||
|
|
|
|||
|
|
@ -156,6 +156,7 @@ Camera2DEditorPlugin::Camera2DEditorPlugin() {
|
|||
camera_2d_editor->connect(SNAME("_editor_theme_changed"), callable_mp(this, &Camera2DEditorPlugin::_editor_theme_changed));
|
||||
|
||||
approach_to_move_rect = memnew(Label);
|
||||
approach_to_move_rect->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
approach_to_move_rect->set_text(TTRC("In Move Mode: \nHold Ctrl + left mouse button to move the limit rectangle.\nHold left mouse button to move the camera only."));
|
||||
approach_to_move_rect->hide();
|
||||
_editor_theme_changed();
|
||||
|
|
|
|||
|
|
@ -6445,6 +6445,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_it
|
|||
canvas_item_editor->get_controls_container()->add_child(label);
|
||||
|
||||
label_desc = memnew(Label);
|
||||
label_desc->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
label_desc->add_theme_color_override(SceneStringName(font_color), Color(0.6f, 0.6f, 0.6f, 1));
|
||||
label_desc->add_theme_color_override("font_shadow_color", Color(0.2f, 0.2f, 0.2f, 1));
|
||||
label_desc->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE);
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ void InputEventConfigContainer::set_event(const Ref<InputEvent> &p_event) {
|
|||
|
||||
InputEventConfigContainer::InputEventConfigContainer() {
|
||||
input_event_text = memnew(Label);
|
||||
input_event_text->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
input_event_text->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
input_event_text->set_autowrap_mode(TextServer::AutowrapMode::AUTOWRAP_WORD_SMART);
|
||||
input_event_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ MaterialEditor::MaterialEditor() {
|
|||
layout_error->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
|
||||
|
||||
error_label = memnew(Label);
|
||||
error_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
error_label->set_text(TTR("Preview is not available for this shader mode."));
|
||||
error_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
error_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -668,6 +668,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
|
|||
navigation_mesh_dialog->add_child(navigation_mesh_dialog_vbc);
|
||||
|
||||
Label *navigation_mesh_l = memnew(Label);
|
||||
navigation_mesh_l->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
navigation_mesh_l->set_text(TTR("Before converting a rendering mesh to a navigation mesh, please verify:\n\n- The mesh is two-dimensional.\n- The mesh has no surface overlap.\n- The mesh has no self-intersection.\n- The mesh surfaces have indices.\n\nIf the mesh does not fulfill these requirements, the pathfinding will be broken."));
|
||||
navigation_mesh_dialog_vbc->add_child(navigation_mesh_l);
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ NavigationPolygonEditor::NavigationPolygonEditor() {
|
|||
button_reset->connect(SceneStringName(pressed), callable_mp(this, &NavigationPolygonEditor::_clear_pressed));
|
||||
|
||||
bake_info = memnew(Label);
|
||||
bake_info->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
bake_hbox->add_child(bake_info);
|
||||
|
||||
rebake_timer = memnew(Timer);
|
||||
|
|
|
|||
|
|
@ -5769,6 +5769,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
|
|||
info_panel->hide();
|
||||
|
||||
info_label = memnew(Label);
|
||||
info_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
info_panel->add_child(info_label);
|
||||
|
||||
cinema_label = memnew(Label);
|
||||
|
|
@ -5805,6 +5806,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
|
|||
surface->add_child(preview_material_label);
|
||||
|
||||
preview_material_label_desc = memnew(Label);
|
||||
preview_material_label_desc->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
preview_material_label_desc->set_anchors_and_offsets_preset(LayoutPreset::PRESET_BOTTOM_LEFT);
|
||||
preview_material_label_desc->set_offset(Side::SIDE_TOP, -50 * EDSCALE);
|
||||
Key key = (OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios")) ? Key::META : Key::CTRL;
|
||||
|
|
|
|||
|
|
@ -1784,7 +1784,10 @@ void ScriptEditor::_notification(int p_what) {
|
|||
[[fallthrough]];
|
||||
}
|
||||
|
||||
case NOTIFICATION_TRANSLATION_CHANGED:
|
||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||
disk_changed_list->set_accessibility_name(TTR("The following files are newer on disk"));
|
||||
[[fallthrough]];
|
||||
}
|
||||
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
tab_container->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("ScriptEditor"), EditorStringName(EditorStyles)));
|
||||
|
|
@ -4227,6 +4230,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||
overview_vbox->add_child(buttons_hbox);
|
||||
|
||||
filename = memnew(Label);
|
||||
filename->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
filename->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
filename->set_clip_text(true);
|
||||
filename->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
|
@ -4385,6 +4389,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||
script_icon = memnew(TextureRect);
|
||||
menu_hb->add_child(script_icon);
|
||||
script_name_label = memnew(Label);
|
||||
script_name_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
menu_hb->add_child(script_name_label);
|
||||
|
||||
script_icon->hide();
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ ConnectionInfoDialog::ConnectionInfoDialog() {
|
|||
add_child(vbc);
|
||||
|
||||
method = memnew(Label);
|
||||
method->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
method->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
vbc->add_child(method);
|
||||
|
||||
|
|
|
|||
|
|
@ -2045,6 +2045,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
delete_anim->set_shortcut(ED_SHORTCUT("sprite_frames/delete_animation", TTRC("Delete Animation"), Key::KEY_DELETE));
|
||||
|
||||
missing_anim_label = memnew(Label);
|
||||
missing_anim_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
missing_anim_label->set_text(TTR("This resource does not have any animations."));
|
||||
missing_anim_label->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
missing_anim_label->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
|
|
|||
|
|
@ -1257,6 +1257,7 @@ TextShaderEditor::TextShaderEditor() {
|
|||
disk_changed->add_child(vbc);
|
||||
|
||||
Label *dl = memnew(Label);
|
||||
dl->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
dl->set_text(TTR("This shader has been modified on disk.\nWhat action should be taken?"));
|
||||
vbc->add_child(dl);
|
||||
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ Texture3DEditor::Texture3DEditor() {
|
|||
add_child(channel_selector);
|
||||
|
||||
info = memnew(Label);
|
||||
info->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
info->add_theme_color_override(SceneStringName(font_color), Color(1, 1, 1));
|
||||
info->add_theme_color_override("font_shadow_color", Color(0, 0, 0));
|
||||
info->add_theme_font_size_override(SceneStringName(font_size), 14 * EDSCALE);
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) {
|
|||
|
||||
if (p_show_metadata) {
|
||||
metadata_label = memnew(Label);
|
||||
metadata_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
|
||||
if (p_texture.is_valid()) {
|
||||
_update_metadata_label_text();
|
||||
|
|
|
|||
|
|
@ -403,6 +403,7 @@ TextureLayeredEditor::TextureLayeredEditor() {
|
|||
add_child(channel_selector);
|
||||
|
||||
info = memnew(Label);
|
||||
info->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
info->add_theme_color_override(SceneStringName(font_color), Color(1, 1, 1));
|
||||
info->add_theme_color_override("font_shadow_color", Color(0, 0, 0));
|
||||
info->add_theme_font_size_override(SceneStringName(font_size), 14 * EDSCALE);
|
||||
|
|
|
|||
|
|
@ -352,6 +352,7 @@ AtlasMergingDialog::AtlasMergingDialog() {
|
|||
atlas_merging_right_panel->add_child(preview);
|
||||
|
||||
select_2_atlases_label = memnew(Label);
|
||||
select_2_atlases_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
select_2_atlases_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
select_2_atlases_label->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
select_2_atlases_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -666,6 +666,7 @@ TileAtlasView::TileAtlasView() {
|
|||
panel->add_child(center_container);
|
||||
|
||||
missing_source_label = memnew(Label);
|
||||
missing_source_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
missing_source_label->set_text(TTR("The selected atlas source has no valid texture. Assign a texture in the TileSet bottom tab."));
|
||||
center_container->add_child(missing_source_label);
|
||||
|
||||
|
|
|
|||
|
|
@ -2389,6 +2389,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
tiles_bottom_panel->set_name(TTR("Tiles"));
|
||||
|
||||
missing_source_label = memnew(Label);
|
||||
missing_source_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
missing_source_label->set_text(TTR("This TileMap's TileSet has no Tile Source configured. Go to the TileSet bottom panel to add one."));
|
||||
missing_source_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
missing_source_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
|
@ -2480,6 +2481,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
|
||||
// Invalid source label.
|
||||
invalid_source_label = memnew(Label);
|
||||
invalid_source_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
invalid_source_label->set_text(TTR("Invalid source selected."));
|
||||
invalid_source_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
invalid_source_label->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
|
@ -2509,6 +2511,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
patterns_bottom_panel->add_child(patterns_item_list);
|
||||
|
||||
patterns_help_label = memnew(Label);
|
||||
patterns_help_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
patterns_help_label->set_text(TTR("Drag and drop or paste a TileMap selection here to store a pattern."));
|
||||
patterns_help_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
patterns_help_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
@ -4552,6 +4555,7 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
|||
|
||||
// A label for editing errors.
|
||||
cant_edit_label = memnew(Label);
|
||||
cant_edit_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
cant_edit_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
cant_edit_label->set_anchors_and_offsets_preset(Control::PRESET_HCENTER_WIDE);
|
||||
cant_edit_label->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
|
|
|||
|
|
@ -2575,6 +2575,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|||
middle_vbox_container->add_child(tile_inspector);
|
||||
|
||||
tile_inspector_no_tile_selected_label = memnew(Label);
|
||||
tile_inspector_no_tile_selected_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
tile_inspector_no_tile_selected_label->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
|
||||
tile_inspector_no_tile_selected_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
tile_inspector_no_tile_selected_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
|
|
@ -2668,6 +2669,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|||
tool_settings->add_child(middle_space);
|
||||
|
||||
tool_tile_id_label = memnew(Label);
|
||||
tool_tile_id_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
tool_tile_id_label->set_mouse_filter(Control::MOUSE_FILTER_STOP);
|
||||
tool_settings->add_child(tool_tile_id_label);
|
||||
_update_tile_id_label();
|
||||
|
|
@ -2688,6 +2690,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|||
right_panel->add_child(tile_atlas_view);
|
||||
|
||||
help_label = memnew(Label);
|
||||
help_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
help_label->set_mouse_filter(MOUSE_FILTER_IGNORE);
|
||||
help_label->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
|
||||
help_label->set_vertical_alignment(VERTICAL_ALIGNMENT_BOTTOM);
|
||||
|
|
|
|||
|
|
@ -915,6 +915,7 @@ TileSetEditor::TileSetEditor() {
|
|||
|
||||
// No source selected.
|
||||
no_source_selected_label = memnew(Label);
|
||||
no_source_selected_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
no_source_selected_label->set_text(TTR("No TileSet source selected. Select or create a TileSet source.\nYou can create a new source by using the Add button on the left or by dropping a tileset texture onto the source list."));
|
||||
no_source_selected_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
no_source_selected_label->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
|
|
@ -956,6 +957,7 @@ TileSetEditor::TileSetEditor() {
|
|||
patterns_item_list->hide();
|
||||
|
||||
patterns_help_label = memnew(Label);
|
||||
patterns_help_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
patterns_help_label->set_text(TTR("Add new patterns in the TileMap editing mode."));
|
||||
patterns_help_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
patterns_help_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -525,6 +525,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
|
|||
|
||||
// Scenes collection source inspector.
|
||||
scenes_collection_source_inspector_label = memnew(Label);
|
||||
scenes_collection_source_inspector_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
scenes_collection_source_inspector_label->set_text(TTR("Scenes collection properties:"));
|
||||
middle_vbox_container->add_child(scenes_collection_source_inspector_label);
|
||||
|
||||
|
|
|
|||
|
|
@ -1139,6 +1139,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
set_up_ssh_passphrase_input->add_child(set_up_ssh_passphrase);
|
||||
|
||||
set_up_warning_text = memnew(Label);
|
||||
set_up_warning_text->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
set_up_warning_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
set_up_warning_text->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
set_up_settings_vbc->add_child(set_up_warning_text);
|
||||
|
|
@ -1503,6 +1504,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
version_control_dock->add_child(diff_heading);
|
||||
|
||||
diff_title = memnew(Label);
|
||||
diff_title->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
diff_title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
diff_heading->add_child(diff_title);
|
||||
|
||||
|
|
|
|||
|
|
@ -762,6 +762,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
|
||||
// Add hint label.
|
||||
Label *frame_hint_label = memnew(Label);
|
||||
frame_hint_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
node->add_child(frame_hint_label);
|
||||
frame_hint_label->set_horizontal_alignment(HorizontalAlignment::HORIZONTAL_ALIGNMENT_CENTER);
|
||||
frame_hint_label->set_vertical_alignment(VerticalAlignment::VERTICAL_ALIGNMENT_CENTER);
|
||||
|
|
@ -878,6 +879,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
String prop_name = dp.name.strip_edges();
|
||||
if (!prop_name.is_empty()) {
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_auto_translate_mode(Node::AUTO_TRANSLATE_MODE_DISABLED); // TODO: Implement proper translation switch.
|
||||
label->set_text(prop_name + ":");
|
||||
hbox->add_child(label);
|
||||
|
|
@ -1151,6 +1153,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
hb->add_child(remove_btn);
|
||||
} else {
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_auto_translate_mode(Node::AUTO_TRANSLATE_MODE_DISABLED); // TODO: Implement proper translation switch.
|
||||
label->set_text(name_left);
|
||||
label->add_theme_style_override(CoreStringName(normal), editor->get_theme_stylebox(SNAME("label_style"), SNAME("VShaderEditor")));
|
||||
|
|
@ -1158,6 +1161,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
|
||||
if (vsnode->is_input_port_default(j, mode) && !port_left_used) {
|
||||
Label *hint_label = memnew(Label);
|
||||
hint_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
hint_label->set_text(TTR("[default]"));
|
||||
hint_label->add_theme_color_override(SceneStringName(font_color), editor->get_theme_color(SNAME("font_readonly_color"), SNAME("TextEdit")));
|
||||
hint_label->add_theme_style_override(CoreStringName(normal), editor->get_theme_stylebox(SNAME("label_style"), SNAME("VShaderEditor")));
|
||||
|
|
@ -1201,6 +1205,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
type_box->connect(SceneStringName(item_selected), callable_mp(editor, &VisualShaderEditor::_change_output_port_type).bind(p_id, i), CONNECT_DEFERRED);
|
||||
} else {
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_auto_translate_mode(Node::AUTO_TRANSLATE_MODE_DISABLED); // TODO: Implement proper translation switch.
|
||||
label->set_text(name_right);
|
||||
label->add_theme_style_override(CoreStringName(normal), editor->get_theme_stylebox(SNAME("label_style"), SNAME("VShaderEditor"))); //more compact
|
||||
|
|
@ -1369,6 +1374,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
}
|
||||
if (!error.is_empty()) {
|
||||
Label *error_label = memnew(Label);
|
||||
error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
error_label->add_theme_color_override(SceneStringName(font_color), editor->get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
error_label->set_text(error);
|
||||
error_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
|
||||
|
|
@ -6142,6 +6148,7 @@ Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
|
|||
d["id"] = id;
|
||||
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_text(it->get_text(0));
|
||||
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
set_drag_preview(label);
|
||||
|
|
@ -6525,6 +6532,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SAMPLER, VisualShaderNode::PORT_TYPE_SAMPLER);
|
||||
|
||||
info_label = memnew(Label);
|
||||
info_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
info_label->set_text(vformat(TTR("Hold %s Key To Swap Connections"), keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL)));
|
||||
info_label->set_anchors_and_offsets_preset(Control::PRESET_BOTTOM_WIDE, PRESET_MODE_MINSIZE, 20);
|
||||
info_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
@ -6689,6 +6697,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
error_panel->set_visible(false);
|
||||
|
||||
error_label = memnew(Label);
|
||||
error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
error_panel->add_child(error_label);
|
||||
error_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
|
||||
|
|
@ -6842,6 +6851,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
desc_hbox->add_spacer();
|
||||
|
||||
highend_label = memnew(Label);
|
||||
highend_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
desc_hbox->add_child(highend_label);
|
||||
highend_label->set_visible(false);
|
||||
highend_label->set_text("Vulkan");
|
||||
|
|
@ -6908,6 +6918,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
varying_mode->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_varying_mode_changed));
|
||||
|
||||
varying_error_label = memnew(Label);
|
||||
varying_error_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
vb->add_child(varying_error_label);
|
||||
varying_error_label->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
|
|
@ -7999,6 +8010,7 @@ public:
|
|||
add_child(hbox);
|
||||
|
||||
Label *prop_name = memnew(Label);
|
||||
prop_name->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
String prop_name_str = p_names[i];
|
||||
if (p_overrided_names.has(p_names[i])) {
|
||||
prop_name_str = p_overrided_names[p_names[i]] + ":";
|
||||
|
|
|
|||
|
|
@ -1461,7 +1461,6 @@ ProjectManager::ProjectManager() {
|
|||
|
||||
sort_label = memnew(Label);
|
||||
sort_label->set_text(TTRC("Sort:"));
|
||||
sort_label->set_focus_mode(Control::FOCUS_NONE);
|
||||
hb->add_child(sort_label);
|
||||
|
||||
filter_option = memnew(OptionButton);
|
||||
|
|
@ -1535,6 +1534,7 @@ ProjectManager::ProjectManager() {
|
|||
empty_list_open_assetlib->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_open_asset_library_confirmed));
|
||||
|
||||
empty_list_online_warning = memnew(Label);
|
||||
empty_list_online_warning->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
empty_list_online_warning->set_horizontal_alignment(HorizontalAlignment::HORIZONTAL_ALIGNMENT_CENTER);
|
||||
empty_list_online_warning->set_custom_minimum_size(Size2(220, 0) * EDSCALE);
|
||||
empty_list_online_warning->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
|
||||
|
|
@ -1679,6 +1679,7 @@ ProjectManager::ProjectManager() {
|
|||
erase_ask->add_child(erase_ask_vb);
|
||||
|
||||
erase_ask_label = memnew(Label);
|
||||
erase_ask_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
erase_ask_vb->add_child(erase_ask_label);
|
||||
|
||||
// Comment out for now until we have a better warning system to
|
||||
|
|
@ -1710,6 +1711,7 @@ ProjectManager::ProjectManager() {
|
|||
ask_update_vb = memnew(VBoxContainer);
|
||||
ask_update_settings->add_child(ask_update_vb);
|
||||
ask_update_label = memnew(Label);
|
||||
ask_update_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
ask_update_label->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
|
||||
ask_update_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
|
||||
ask_update_label->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
|
@ -1809,6 +1811,7 @@ ProjectManager::ProjectManager() {
|
|||
create_tag_dialog->connect("about_to_popup", callable_mp((Control *)new_tag_name, &Control::grab_focus), CONNECT_DEFERRED);
|
||||
|
||||
tag_error = memnew(Label);
|
||||
tag_error->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
tag_vb->add_child(tag_error);
|
||||
|
||||
create_tag_btn = memnew(Button);
|
||||
|
|
|
|||
|
|
@ -1011,6 +1011,7 @@ ProjectDialog::ProjectDialog() {
|
|||
iphb->add_child(install_browse);
|
||||
|
||||
msg = memnew(Label);
|
||||
msg->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
msg->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
msg->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
|
||||
msg->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
|
|
@ -1086,10 +1087,12 @@ ProjectDialog::ProjectDialog() {
|
|||
rvb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
rshc->add_child(rvb);
|
||||
renderer_info = memnew(Label);
|
||||
renderer_info->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
renderer_info->set_modulate(Color(1, 1, 1, 0.7));
|
||||
rvb->add_child(renderer_info);
|
||||
|
||||
rd_not_supported = memnew(Label);
|
||||
rd_not_supported->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
rd_not_supported->set_text(vformat(TTRC("RenderingDevice-based methods not available on this GPU:\n%s\nPlease use the Compatibility renderer."), RenderingServer::get_singleton()->get_video_adapter_name()));
|
||||
rd_not_supported->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
rd_not_supported->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
|
||||
|
|
@ -1100,6 +1103,7 @@ ProjectDialog::ProjectDialog() {
|
|||
_renderer_selected();
|
||||
|
||||
l = memnew(Label);
|
||||
l->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
l->set_text(TTRC("The renderer can be changed later, but scenes may need to be adjusted."));
|
||||
// Add some extra spacing to separate it from the list above and the buttons below.
|
||||
l->set_custom_minimum_size(Size2(0, 40) * EDSCALE);
|
||||
|
|
@ -1118,6 +1122,7 @@ ProjectDialog::ProjectDialog() {
|
|||
vcs_metadata_selection->add_item(TTRC("None"), (int)EditorVCSInterface::VCSMetadata::NONE);
|
||||
vcs_metadata_selection->add_item(TTRC("Git"), (int)EditorVCSInterface::VCSMetadata::GIT);
|
||||
vcs_metadata_selection->select((int)EditorVCSInterface::VCSMetadata::GIT);
|
||||
vcs_metadata_selection->set_accessibility_name(TTRC("Version Control Metadata"));
|
||||
default_files_container->add_child(vcs_metadata_selection);
|
||||
Control *spacer = memnew(Control);
|
||||
spacer->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
|
|
|||
|
|
@ -357,6 +357,7 @@ ProjectListItemControl::ProjectListItemControl() {
|
|||
main_vbox->add_child(title_hb);
|
||||
|
||||
project_title = memnew(Label);
|
||||
project_title->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
project_title->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
project_title->set_name("ProjectName");
|
||||
project_title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
|
@ -387,6 +388,7 @@ ProjectListItemControl::ProjectListItemControl() {
|
|||
|
||||
project_path = memnew(Label);
|
||||
project_path->set_name("ProjectPath");
|
||||
project_path->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
project_path->set_structured_text_bidi_override(TextServer::STRUCTURED_TEXT_FILE);
|
||||
project_path->set_clip_text(true);
|
||||
project_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
|
@ -400,11 +402,13 @@ ProjectListItemControl::ProjectListItemControl() {
|
|||
project_unsupported_features->hide();
|
||||
|
||||
project_version = memnew(Label);
|
||||
project_version->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
project_version->set_name("ProjectVersion");
|
||||
project_version->set_mouse_filter(Control::MOUSE_FILTER_PASS);
|
||||
path_hb->add_child(project_version);
|
||||
|
||||
last_edited_info = memnew(Label);
|
||||
last_edited_info->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
last_edited_info->set_name("LastEditedInfo");
|
||||
last_edited_info->set_mouse_filter(Control::MOUSE_FILTER_PASS);
|
||||
last_edited_info->set_tooltip_text(TTRC("Last edited timestamp"));
|
||||
|
|
|
|||
|
|
@ -734,6 +734,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
|
|||
restart_hb->add_child(restart_icon);
|
||||
|
||||
restart_label = memnew(Label);
|
||||
restart_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
restart_label->set_text(TTR("Changed settings will be applied to the editor after restarting."));
|
||||
restart_hb->add_child(restart_label);
|
||||
restart_hb->add_spacer();
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor) {
|
|||
vbc->add_child(lbl_preview_title);
|
||||
|
||||
lbl_preview = memnew(Label);
|
||||
lbl_preview->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
lbl_preview->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
lbl_preview->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
|
||||
vbc->add_child(lbl_preview);
|
||||
|
|
|
|||
|
|
@ -4846,6 +4846,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
|
|||
delete_dialog->add_child(vb);
|
||||
|
||||
delete_dialog_label = memnew(Label);
|
||||
delete_dialog_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
vb->add_child(delete_dialog_label);
|
||||
|
||||
delete_tracks_checkbox = memnew(CheckBox(TTR("Delete Related Animation Tracks")));
|
||||
|
|
|
|||
|
|
@ -529,6 +529,7 @@ bool EditorFileSystemImportFormatSupportQueryBlend::query() {
|
|||
vb->add_child(hb);
|
||||
|
||||
path_status = memnew(Label);
|
||||
path_status->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
vb->add_child(path_status);
|
||||
|
||||
configure_blender_dialog->add_child(vb);
|
||||
|
|
|
|||
|
|
@ -1594,6 +1594,7 @@ GridMapEditor::GridMapEditor() {
|
|||
mesh_library_palette->connect(SceneStringName(gui_input), callable_mp(this, &GridMapEditor::_mesh_library_palette_input));
|
||||
|
||||
info_message = memnew(Label);
|
||||
info_message->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
info_message->set_text(TTR("Give a MeshLibrary resource to this GridMap to use its meshes."));
|
||||
info_message->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
|
||||
info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
|
|||
|
||||
Label *lb = memnew(Label);
|
||||
// TRANSLATORS: This is the label for the network profiler's incoming bandwidth.
|
||||
lb->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
lb->set_text(TTR("Down", "Network"));
|
||||
hb->add_child(lb);
|
||||
|
||||
|
|
@ -348,6 +349,7 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
|
|||
|
||||
lb = memnew(Label);
|
||||
// TRANSLATORS: This is the label for the network profiler's outgoing bandwidth.
|
||||
lb->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
lb->set_text(TTR("Up", "Network"));
|
||||
hb->add_child(lb);
|
||||
|
||||
|
|
|
|||
|
|
@ -275,6 +275,7 @@ ReplicationEditor::ReplicationEditor() {
|
|||
vb->add_child(tree);
|
||||
|
||||
drop_label = memnew(Label);
|
||||
drop_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
drop_label->set_text(TTR("Add properties using the options above, or\ndrag them from the inspector and drop them here."));
|
||||
drop_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
drop_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ NavigationMeshEditor::NavigationMeshEditor() {
|
|||
button_reset->connect(SceneStringName(pressed), callable_mp(this, &NavigationMeshEditor::_clear_pressed));
|
||||
|
||||
bake_info = memnew(Label);
|
||||
bake_info->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
bake_hbox->add_child(bake_info);
|
||||
|
||||
err_dialog = memnew(AcceptDialog);
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ OpenXRBindingModifiersDialog::OpenXRBindingModifiersDialog() {
|
|||
binding_modifier_sc->add_child(binding_modifiers_vb);
|
||||
|
||||
binding_warning_label = memnew(Label);
|
||||
binding_warning_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
binding_warning_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
|
||||
binding_warning_label->set_text(TTR("Note: modifiers will only be applied if supported on the host system."));
|
||||
binding_modifiers_vb->add_child(binding_warning_label);
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
|
|||
p_container->add_child(path_hb);
|
||||
|
||||
Label *path_label = memnew(Label);
|
||||
path_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
if (p_io_path->openxr_extension_name.is_empty()) {
|
||||
path_label->set_text(p_io_path->display_name);
|
||||
} else {
|
||||
|
|
@ -252,6 +253,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
|
|||
path_hb->add_child(path_label);
|
||||
|
||||
Label *type_label = memnew(Label);
|
||||
type_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
switch (p_io_path->action_type) {
|
||||
case OpenXRAction::OPENXR_ACTION_BOOL: {
|
||||
type_label->set_text(TTR("Boolean"));
|
||||
|
|
@ -297,6 +299,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
|
|||
action_hb->add_child(indent_node);
|
||||
|
||||
Label *action_label = memnew(Label);
|
||||
action_label->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
action_label->set_text(action->get_name_with_set() + ": " + action->get_localized_name());
|
||||
action_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
action_hb->add_child(action_label);
|
||||
|
|
@ -361,6 +364,7 @@ void OpenXRInteractionProfileEditor::_update_interaction_profile() {
|
|||
panel->add_child(container);
|
||||
|
||||
Label *label = memnew(Label);
|
||||
label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
label->set_text(OpenXRInteractionProfileMetadata::get_singleton()->get_top_level_name(top_level_paths[i]));
|
||||
container->add_child(label);
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ void OpenXRSelectActionDialog::open() {
|
|||
Ref<OpenXRActionSet> action_set = action_sets[i];
|
||||
|
||||
Label *action_set_label = memnew(Label);
|
||||
action_set_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
action_set_label->set_text(action_set->get_localized_name());
|
||||
main_vb->add_child(action_set_label);
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ OpenXRSelectInteractionProfileDialog::OpenXRSelectInteractionProfileDialog() {
|
|||
scroll->add_child(main_vb);
|
||||
|
||||
all_selected = memnew(Label);
|
||||
all_selected->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
all_selected->set_text(TTR("All interaction profiles have been added to the action map."));
|
||||
main_vb->add_child(all_selected);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ MarginContainer *VBoxContainer::add_margin_child(const String &p_label, Control
|
|||
if (p_expand) {
|
||||
mc->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
}
|
||||
p_control->set_accessibility_name(p_label);
|
||||
|
||||
return mc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -463,6 +463,7 @@ AcceptDialog::AcceptDialog() {
|
|||
buttons_hbox = memnew(HBoxContainer);
|
||||
|
||||
message_label = memnew(Label);
|
||||
message_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
message_label->set_anchor(SIDE_RIGHT, Control::ANCHOR_END);
|
||||
message_label->set_anchor(SIDE_BOTTOM, Control::ANCHOR_END);
|
||||
add_child(message_label, false, INTERNAL_MODE_FRONT);
|
||||
|
|
|
|||
|
|
@ -1442,7 +1442,6 @@ void FileDialog::_update_option_controls() {
|
|||
for (const FileDialog::Option &opt : options) {
|
||||
Label *lbl = memnew(Label);
|
||||
lbl->set_text(opt.name);
|
||||
lbl->set_focus_mode(Control::FOCUS_NONE);
|
||||
grid_options->add_child(lbl);
|
||||
if (opt.values.is_empty()) {
|
||||
CheckBox *cb = memnew(CheckBox);
|
||||
|
|
@ -1753,7 +1752,6 @@ FileDialog::FileDialog() {
|
|||
dir_up->connect(SceneStringName(pressed), callable_mp(this, &FileDialog::_go_up));
|
||||
|
||||
Label *lbl_path = memnew(Label(ETR("Path:")));
|
||||
lbl_path->set_focus_mode(Control::FOCUS_NONE);
|
||||
hbc->add_child(lbl_path);
|
||||
|
||||
drives_container = memnew(HBoxContainer);
|
||||
|
|
@ -1813,6 +1811,7 @@ FileDialog::FileDialog() {
|
|||
vbox->add_margin_child(ETR("Directories & Files:"), tree, true);
|
||||
|
||||
message = memnew(Label);
|
||||
message->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
|
||||
message->hide();
|
||||
message->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
|
||||
message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
|
|
@ -1833,7 +1832,6 @@ FileDialog::FileDialog() {
|
|||
|
||||
file_box = memnew(HBoxContainer);
|
||||
Label *lbl_file = memnew(Label(ETR("File:")));
|
||||
lbl_file->set_focus_mode(Control::FOCUS_NONE);
|
||||
file_box->add_child(lbl_file);
|
||||
|
||||
file = memnew(LineEdit);
|
||||
|
|
|
|||
|
|
@ -1264,7 +1264,6 @@ GraphNode::GraphNode() {
|
|||
title_label = memnew(Label);
|
||||
title_label->set_theme_type_variation("GraphNodeTitleLabel");
|
||||
title_label->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
title_label->set_focus_mode(Control::FOCUS_NONE);
|
||||
titlebar_hbox->add_child(title_label);
|
||||
|
||||
set_mouse_filter(MOUSE_FILTER_STOP);
|
||||
|
|
|
|||
|
|
@ -1484,7 +1484,6 @@ void Label::_bind_methods() {
|
|||
}
|
||||
|
||||
Label::Label(const String &p_text) {
|
||||
set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
set_mouse_filter(MOUSE_FILTER_IGNORE);
|
||||
set_text(p_text);
|
||||
set_v_size_flags(SIZE_SHRINK_CENTER);
|
||||
|
|
|
|||
|
|
@ -1041,6 +1041,7 @@ Variant LineEdit::get_drag_data(const Point2 &p_point) {
|
|||
String t = get_selected_text();
|
||||
Label *l = memnew(Label);
|
||||
l->set_text(t);
|
||||
l->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
l->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Don't translate user input.
|
||||
set_drag_preview(l);
|
||||
return t;
|
||||
|
|
|
|||
|
|
@ -6343,6 +6343,7 @@ Variant RichTextLabel::get_drag_data(const Point2 &p_point) {
|
|||
String t = get_selected_text();
|
||||
Label *l = memnew(Label);
|
||||
l->set_text(t);
|
||||
l->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
l->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Text is already translated.
|
||||
set_drag_preview(l);
|
||||
return t;
|
||||
|
|
|
|||
|
|
@ -3381,6 +3381,7 @@ Variant TextEdit::get_drag_data(const Point2 &p_point) {
|
|||
String t = get_selected_text();
|
||||
Label *l = memnew(Label);
|
||||
l->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Don't translate user input.
|
||||
l->set_focus_mode(FOCUS_ACCESSIBILITY);
|
||||
l->set_text(t);
|
||||
set_drag_preview(l);
|
||||
return t;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue