diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-10-25 16:07:00 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-10-25 17:57:26 +0300 |
commit | b17038db31e0dd312dd3987fb9491bf402b3a40a (patch) | |
tree | cc57a564c6aafc26954b74c1a76851712acc79ce /source/blender/windowmanager/intern/wm_dragdrop.c | |
parent | e8027ec2a0cac4b0e92d51a64ccc40fd3f190a20 (diff) |
Drag Drop: allow customizable drawing
Diffstat (limited to 'source/blender/windowmanager/intern/wm_dragdrop.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_dragdrop.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index 8495fa2a082..bad58c32cdb 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -670,6 +670,17 @@ static void wm_drag_draw_item_name(wmDrag *drag, const int x, const int y) UI_fontstyle_draw_simple(fstyle, x, y, WM_drag_get_item_name(drag), text_col); } +void WM_drag_draw_item_name_fn(bContext *UNUSED(C), + wmWindow *UNUSED(win), + wmDrag *drag, + const int xy[2]) +{ + int x = xy[0] + 10 * UI_DPI_FAC; + int y = xy[1] + 1 * UI_DPI_FAC; + + wm_drag_draw_item_name(drag, x, y); +} + static void wm_drag_draw_tooltip(bContext *C, wmWindow *win, wmDrag *drag, const int xy[2]) { if (!CTX_wm_region(C)) { |