diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-27 05:15:31 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-27 05:15:31 +0400 |
commit | 222fe6b1a5d49f67177cbb762f55a0e482145f5d (patch) | |
tree | 2ff249d49385233c34cddd473e457a76a17b90c8 /source/blender/editors/interface/interface_utils.c | |
parent | d839a9ae9ccbf17375e28cc92aa75a0cb4cf6b11 (diff) |
UI
* Search popup + autocomplete for bones, vertex groups, etc. This
is done with layout.item_pointerR, specifying an RNA collection to
take the items from. Used by constraints and modifiers.
* Some tests with the List template, ignore those for now..
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r-- | source/blender/editors/interface/interface_utils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index e67e5b5a871..3ed81a3e9bc 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -111,7 +111,12 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind but= uiDefButR(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); break; case PROP_STRING: - but= uiDefButR(block, TEX, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); + if(icon && name && strcmp(name, "") == 0) + but= uiDefIconButR(block, TEX, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); + else if(icon) + but= uiDefIconTextButR(block, TEX, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); + else + but= uiDefButR(block, TEX, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); break; case PROP_POINTER: { PointerRNA pptr; |