Skip to content

Commit

Permalink
Enable Drag and Drop for SubViewports and Windows
Browse files Browse the repository at this point in the history
Search embedded Windows and SubViewports iteratively for Drop targets.
Display Preview above embedded windows.
Store Drag-information windowmanager-window-wide or application-wide.
Send mouse enter/exit notifications to Drop-targets.
  • Loading branch information
Sauermann committed Oct 20, 2022
1 parent a8c805b commit c20e855
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 110 deletions.
2 changes: 1 addition & 1 deletion scene/gui/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,7 @@ void Control::force_drag(const Variant &p_data, Control *p_control) {
void Control::set_drag_preview(Control *p_control) {
ERR_FAIL_COND(!is_inside_tree());
ERR_FAIL_COND(!get_viewport()->gui_is_dragging());
get_viewport()->_gui_set_drag_preview(this, p_control);
get_viewport()->_gui_set_drag_preview(p_control);
}

bool Control::is_drag_successful() const {
Expand Down
Loading

0 comments on commit c20e855

Please sign in to comment.