You've already forked godot
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user