Initial editor accessibility.
This commit is contained in:
parent
4310cb82b8
commit
302fa831cc
137 changed files with 1544 additions and 93 deletions
|
|
@ -759,7 +759,7 @@ Variant EditorSettingsDialog::get_drag_data_fw(const Point2 &p_point, Control *p
|
|||
|
||||
bool EditorSettingsDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
|
||||
TreeItem *selected = shortcuts->get_selected();
|
||||
TreeItem *item = shortcuts->get_item_at_position(p_point);
|
||||
TreeItem *item = (p_point == Vector2(INFINITY, INFINITY)) ? shortcuts->get_selected() : shortcuts->get_item_at_position(p_point);
|
||||
if (!selected || !item || item == selected || (String)item->get_meta("type", "") != "event") {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -778,7 +778,7 @@ void EditorSettingsDialog::drop_data_fw(const Point2 &p_point, const Variant &p_
|
|||
}
|
||||
|
||||
TreeItem *selected = shortcuts->get_selected();
|
||||
TreeItem *target = shortcuts->get_item_at_position(p_point);
|
||||
TreeItem *target = (p_point == Vector2(INFINITY, INFINITY)) ? shortcuts->get_selected() : shortcuts->get_item_at_position(p_point);
|
||||
|
||||
if (!target) {
|
||||
return;
|
||||
|
|
@ -901,6 +901,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
|||
|
||||
search_box = memnew(LineEdit);
|
||||
search_box->set_placeholder(TTR("Filter Settings"));
|
||||
search_box->set_accessibility_name(TTRC("Filter Settings"));
|
||||
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
hbc->add_child(search_box);
|
||||
|
||||
|
|
@ -936,6 +937,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
|||
restart_hb->add_child(restart_button);
|
||||
restart_button->set_text(TTR("Save & Restart"));
|
||||
restart_close_button = memnew(Button);
|
||||
restart_close_button->set_accessibility_name(TTRC("Close"));
|
||||
restart_close_button->set_flat(true);
|
||||
restart_close_button->connect(SceneStringName(pressed), callable_mp(this, &EditorSettingsDialog::_editor_restart_close));
|
||||
restart_hb->add_child(restart_close_button);
|
||||
|
|
@ -954,6 +956,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
|||
|
||||
shortcut_search_box = memnew(LineEdit);
|
||||
shortcut_search_box->set_placeholder(TTR("Filter by Name"));
|
||||
shortcut_search_box->set_accessibility_name(TTRC("Filter by Name"));
|
||||
shortcut_search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
top_hbox->add_child(shortcut_search_box);
|
||||
shortcut_search_box->connect(SceneStringName(text_changed), callable_mp(this, &EditorSettingsDialog::_filter_shortcuts));
|
||||
|
|
@ -975,6 +978,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
|||
top_hbox->add_child(clear_all_search);
|
||||
|
||||
shortcuts = memnew(Tree);
|
||||
shortcuts->set_accessibility_name(TTRC("Shortcuts"));
|
||||
shortcuts->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
shortcuts->set_columns(2);
|
||||
shortcuts->set_hide_root(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue