WindowManager: Support Dynamic tooltips when dragging.
Originally the operator name was drawn next to the dragging content. After that there was an option to add custom, static text with the dragging content. This patch allows dynamic text to be drawn. The custom text was implemented as out parameter of the poll function what made the code unclear. This patch introduces a tooltip function that separates tooltip generation from the poll function. NOTE: the text should always be returned in its own memory block. This block will be freed after it is copied in the drag struct. Reviewed By: Severin Differential Revision: https://developer.blender.org/D12104
This commit is contained in:
@@ -2577,10 +2577,7 @@ void ED_keymap_ui(struct wmKeyConfig *keyconf);
|
||||
void ED_uilisttypes_ui(void);
|
||||
|
||||
void UI_drop_color_copy(struct wmDrag *drag, struct wmDropBox *drop);
|
||||
bool UI_drop_color_poll(struct bContext *C,
|
||||
struct wmDrag *drag,
|
||||
const struct wmEvent *event,
|
||||
const char **r_tooltip);
|
||||
bool UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event);
|
||||
|
||||
bool UI_context_copy_to_selected_list(struct bContext *C,
|
||||
struct PointerRNA *ptr,
|
||||
|
||||
Reference in New Issue
Block a user