diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-11 02:06:03 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-11 02:07:09 +0300 |
commit | 4f1e3875884506c017e03469658e9e7dadeeb500 (patch) | |
tree | ea3f5325a349ba3c749b7b5df6d0023329b070f4 /source/blender/editors/interface/interface_intern.h | |
parent | d18993d4e457b195b2ebfc910dbaf14a023e1ec8 (diff) |
UI: add optional tip callback to uiBut, and use it for per-item tooltips in UIList.
When defined, uiBut->tip_func is called when button's tip is generated. This allows
for advanced, dynamic generation of tooltips.
For now, only used by UIList, which can now optionaly use a given string property
of each item for its tooltip.
Thanks to Campbell for the reviews!
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 458e268170f..03816a255ad 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -254,7 +254,11 @@ struct uiBut { uiLink *link; short linkto[2]; /* region relative coords */ - const char *tip, *lockstr; + const char *tip; + uiButToolTipFunc tip_func; + void *tip_argN; + + const char *lockstr; BIFIconID icon; bool lock; |