diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-25 10:55:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-25 11:05:13 +0300 |
commit | e5836423127e4c10c2f01657ee0976d49582fd33 (patch) | |
tree | a078ccebdb444a3d00d0554535c205bdf4116ca0 /source/blender/editors/include | |
parent | ca0cc0518f23ad0fa8c0a3c3614d6a469f4af20e (diff) |
UI: add UILayout.prop_popover_enum function
Support for RNA enum buttons that activate popovers when clicked.
This means we get useful tooltips, shortcuts and Ctrl-Wheel cycling
over enum items.
It also avoids inconvenient & slow access of enum values currently done
via RNA type lookups on the type to get the name & icon to use for a
regular popover button.
Resolves T57738
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index f6014f58043..1838e8d05b2 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1239,7 +1239,13 @@ void uiItemFullOMenuHold_ptr( PointerRNA *r_opptr); void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon); -void uiItemFullR(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon); +void uiItemFullR( + uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, + const char *name, int icon); +void uiItemFullR_with_popover( + uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, + const char *name, int icon, + const char *panel_type); void uiItemEnumR_prop(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, PropertyRNA *prop, int value); void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, const char *propname, int value); void uiItemEnumR_string_prop(uiLayout *layout, struct PointerRNA *ptr, PropertyRNA *prop, const char *value, const char *name, int icon); |