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!
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user