diff options
author | Ton Roosendaal <ton@blender.org> | 2009-06-10 15:43:21 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-06-10 15:43:21 +0400 |
commit | fba6a9931c81e8cc6a3ea5d3cbd466f2d759c514 (patch) | |
tree | 573f2d39036d37cecde991ffba8000a5f845b48d /source/blender/editors/interface/interface.c | |
parent | 872767f5c76db75797344b84c056d6cef28248e8 (diff) |
2.5
First version of search-based ID browsing. Now only in use for the
top bar screen/scene browse. The python buttons will follow.
Also made search button colors match the theme colors from menu back.
Todos for browse-search:
- "Add new" will disappear, and become a separate icon button in the
row of widgets (like X, delete).
- Drawing the preview icons in menu
- Make search menu dynamic, with configurable number of items? And/or
multi-collumn... for now it's static
- Search menu should popup with last active ID visible and selected
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index bef01b5a454..79e32d4a5f1 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -432,6 +432,7 @@ static void ui_draw_links(uiBlock *block) /* ************** BLOCK ENDING FUNCTION ************* */ +/* NOTE: if but->poin is allocated memory for every defbut, things fail... */ static int ui_but_equals_old(uiBut *but, uiBut *oldbut) { /* various properties are being compared here, hopfully sufficient @@ -3012,6 +3013,16 @@ uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, char *st return but; } +uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, char *str, short x1, short y1, short x2, short y2, char *tip) +{ + uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, NULL, 0.0, 0.0, 0.0, 0.0, tip); + but->block_create_func= func; + but->func_argN= argN; + ui_check_but(but); + return but; +} + + uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, char *str, short x1, short y1, short x2, short y2, char *tip) { uiBut *but= ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); @@ -3095,7 +3106,6 @@ uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxle but->flag|= UI_HAS_ICON; but->flag|= UI_ICON_LEFT|UI_TEXT_LEFT; - but->flag|= UI_ICON_SUBMENU; ui_check_but(but); |