Is it posible to change or hide the "can't drop" cursor shape?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By hinasis

After a while, avoiding using it, I’m getting fine with Godot’s drag and drop feature.

I want to know if there is a way to change/hide/remove the default mouse icon that appears when target control rejects the dragging data.

I mean the “prohibited” icon:

It’s weird because it cancels the drag preview and it’s not well looking.

(Couldn’t take a SS because the mouse disappears)

Thanks

:bust_in_silhouette: Reply From: hinasis

Currently, almost imposible from GDScript.
Even if you hide the mouse before dragging, while dragging the mouse is always visible, and there is no easy way to know what happens in the dragging process, no options, no signals.

So I ended dealing with custom mouse cursors, they need to be 32x32 size.
I draw a 100% alpha square then added a 50% white pixel at column 3 row 3 from the pixel grid, so it’s almost imperceptible. The code at main script:

var can_drop_cursor_img = load("res://assets/cursors/can_drop.png")
var forbidden_cursor_img = load("res://assets/cursors/forbidden.png")
Input.set_custom_mouse_cursor(can_drop_cursor_img,7)
Input.set_custom_mouse_cursor(forbidden_cursor_img,8)

7 is Input.CURSOR_CAN_DROP and 8 is Input.CURSOR_FORBIDDEN.
Note, I didn’t use the same image file for both because of “technical issues” only one will work, so that’s why I gave them different file names.

:bust_in_silhouette: Reply From: ntropy.space

For anyone still trying to figure out how to avoid “stop” icon, I found a way by making the container in the back (ideally the whole screen) also accepting drop event, so the icon will not appear.