Initial editor accessibility.

This commit is contained in:
Pāvels Nadtočajevs 2025-03-21 09:55:22 +02:00
parent 4310cb82b8
commit 302fa831cc
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
137 changed files with 1544 additions and 93 deletions

View file

@ -290,8 +290,10 @@ MultiMeshEditor::MultiMeshEditor() {
surface_source = memnew(LineEdit);
hbc->add_child(surface_source);
surface_source->set_h_size_flags(SIZE_EXPAND_FILL);
surface_source->set_accessibility_name(TTRC("Surface Source"));
Button *b = memnew(Button);
hbc->add_child(b);
b->set_accessibility_name(TTRC("Browse"));
b->set_text("..");
b->connect(SceneStringName(pressed), callable_mp(this, &MultiMeshEditor::_browse).bind(false));
@ -301,13 +303,16 @@ MultiMeshEditor::MultiMeshEditor() {
mesh_source = memnew(LineEdit);
hbc->add_child(mesh_source);
mesh_source->set_h_size_flags(SIZE_EXPAND_FILL);
mesh_source->set_accessibility_name(TTRC("Mesh Source"));
b = memnew(Button);
hbc->add_child(b);
b->set_accessibility_name(TTRC("Browse"));
b->set_text("..");
vbc->add_margin_child(TTR("Source Mesh:"), hbc);
b->connect(SceneStringName(pressed), callable_mp(this, &MultiMeshEditor::_browse).bind(true));
populate_axis = memnew(OptionButton);
populate_axis->set_accessibility_name(TTRC("Up Axis"));
populate_axis->add_item(TTR("X-Axis"));
populate_axis->add_item(TTR("Y-Axis"));
populate_axis->add_item(TTR("Z-Axis"));
@ -317,11 +322,13 @@ MultiMeshEditor::MultiMeshEditor() {
populate_rotate_random = memnew(HSlider);
populate_rotate_random->set_max(1);
populate_rotate_random->set_step(0.01);
populate_rotate_random->set_accessibility_name(TTRC("Random Rotation"));
vbc->add_margin_child(TTR("Random Rotation:"), populate_rotate_random);
populate_tilt_random = memnew(HSlider);
populate_tilt_random->set_max(1);
populate_tilt_random->set_step(0.01);
populate_tilt_random->set_accessibility_name(TTRC("Random Tilt"));
vbc->add_margin_child(TTR("Random Tilt:"), populate_tilt_random);
populate_scale_random = memnew(SpinBox);
@ -329,7 +336,7 @@ MultiMeshEditor::MultiMeshEditor() {
populate_scale_random->set_max(1);
populate_scale_random->set_value(0);
populate_scale_random->set_step(0.01);
populate_scale_random->set_accessibility_name(TTRC("Random Scale"));
vbc->add_margin_child(TTR("Random Scale:"), populate_scale_random);
populate_scale = memnew(SpinBox);
@ -337,7 +344,7 @@ MultiMeshEditor::MultiMeshEditor() {
populate_scale->set_max(4096);
populate_scale->set_value(1);
populate_scale->set_step(0.01);
populate_scale->set_accessibility_name(TTRC("Scale"));
vbc->add_margin_child(TTR("Scale:"), populate_scale);
populate_amount = memnew(SpinBox);
@ -347,6 +354,7 @@ MultiMeshEditor::MultiMeshEditor() {
populate_amount->set_min(1);
populate_amount->set_max(65536);
populate_amount->set_value(128);
populate_amount->set_accessibility_name(TTRC("Amount"));
vbc->add_margin_child(TTR("Amount:"), populate_amount);
populate_dialog->set_ok_button_text(TTR("Populate"));