diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-23 18:24:40 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-23 18:24:40 +0400 |
commit | 28002edb6bf295d7d58c71cc402fd86d260faf2f (patch) | |
tree | 70d869810130779f978eb0dcdd164a30d0c73914 /source/blender/editors/include/UI_interface.h | |
parent | 9b45f607c927028960406bb558a9fe7d9f67c0ba (diff) |
Finish changes in up/down arrows for menus
Restored single triangle for special menus, which still isn't perfect but
probably makes more sense.
Added drawflag bit flags to button, which is currently used to declare, that
button need to have up/down arrows. This is needed because it's tricky to
distinguish if button should have such arrows. For example, ID search buttons
is a simple block button which doesn't directly mean it'll have pop-up menu
and not all buttons which cases pop-up menu to display need to have such
arrows.
So currently only ID selector button is forcing up/down arrows to be displayed,
all the rest buttons now behaves in the same way as it used to be before.
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index c0f9d6dd5cd..b82a0c5e480 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -171,6 +171,9 @@ typedef struct uiLayout uiLayout; #define UI_PANEL_WIDTH 340 #define UI_COMPACT_PANEL_WIDTH 160 +/* uiBut->drawflag */ +#define UI_BUT_DRAW_ENUM_ARROWS (1 << 0) /* draw enum-like up/down arrows for button */ + /* scale fixed button widths by this to account for DPI * 8.4852 == sqrtf(72.0f)) */ #define UI_DPI_FAC (sqrtf((float)U.dpi) / 8.48528137423857f) @@ -427,6 +430,9 @@ int UI_but_active_drop_name(struct bContext *C); void uiButSetFlag(uiBut *but, int flag); void uiButClearFlag(uiBut *but, int flag); +void uiButSetDrawFlag(uiBut *but, int flag); +void uiButClearDrawFlag(uiBut *but, int flag); + /* special button case, only draw it when used actively, for outliner etc */ int uiButActiveOnly(const struct bContext *C, uiBlock *block, uiBut *but); |