Rename consume_drag_and_drop to mouse_target

The functionality of the parameter is not limited to drag-and-drop
operations, but it has also other uses.
So its name should not be tied to drag-and-drop.

The API was created in the not yet released Godot 4.4-dev6, so this
change should not be considered compatibility breaking.
This commit is contained in:
Markus Sauermann
2024-11-25 21:36:29 +01:00
parent 0c45ace151
commit 003647972f
4 changed files with 17 additions and 16 deletions

View File

@ -3062,8 +3062,8 @@ void Viewport::_update_mouse_over(Vector2 p_pos) {
}
Viewport *section_root = get_section_root_viewport();
if (section_root && c->is_consume_drag_and_drop_enabled()) {
// Evaluating `consume_drag_and_drop` and adjusting target_control needs to happen
if (section_root && c->is_mouse_target_enabled()) {
// Evaluating `mouse_target` and adjusting target_control needs to happen
// after `_update_mouse_over` in the SubViewports, because otherwise physics picking
// would not work inside SubViewports.
section_root->gui.target_control = over;