Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-10-26 19:04:45 +0300
committerJulian Eisel <julian@blender.org>2021-10-26 19:14:17 +0300
commitdf2e05393533bff6b14751deb890ef0fc4064c8f (patch)
tree09eaaf20d2e5e8fed54b7cf6966db1d2cd88b69a /source/blender/windowmanager/WM_types.h
parentec831ce5df86cbdbed8030d8a056f8a9b4eb0273 (diff)
UI: Improved feedback when dropping is not possible on drag 'n drop
* Allow operators to show a "disabled hint" in red text explaining why dropping at the current location and in current context doesn't work. Should greatly help users to understand what's the problem. * Show a "stop" cursor when dropping isn't possible, like it's common on OSes. Differential Revision: https://developer.blender.org/D10358
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 2813047f0e4..1f1b1a70685 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -1044,6 +1044,11 @@ typedef struct wmDrag {
* triggered.
*/
struct wmDropBox *active_dropbox;
+ /* Text to show when the operator poll fails. Typically the message the
+ * operator set with CTX_wm_operator_poll_msg_set(). */
+ const char *disabled_info;
+ bool free_disabled_info;
+
unsigned int flags;
/** List of wmDragIDs, all are guaranteed to have the same ID type. */