mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Initial editor accessibility.
This commit is contained in:
parent
4310cb82b8
commit
302fa831cc
137 changed files with 1544 additions and 93 deletions
|
|
@ -641,7 +641,14 @@ Variant ShaderEditorPlugin::get_drag_data_fw(const Point2 &p_point, Control *p_f
|
|||
return Variant();
|
||||
}
|
||||
|
||||
int idx = shader_list->get_item_at_position(p_point);
|
||||
int idx = 0;
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
if (shader_list->is_anything_selected()) {
|
||||
idx = shader_list->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
idx = shader_list->get_item_at_position(p_point);
|
||||
}
|
||||
if (idx < 0) {
|
||||
return Variant();
|
||||
}
|
||||
|
|
@ -718,7 +725,14 @@ void ShaderEditorPlugin::drop_data_fw(const Point2 &p_point, const Variant &p_da
|
|||
|
||||
if (String(d["type"]) == "shader_list_element") {
|
||||
int idx = d["shader_list_element"];
|
||||
int new_idx = shader_list->get_item_at_position(p_point);
|
||||
int new_idx = 0;
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
if (shader_list->is_anything_selected()) {
|
||||
new_idx = shader_list->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
new_idx = shader_list->get_item_at_position(p_point);
|
||||
}
|
||||
_move_shader_tab(idx, new_idx);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue