diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-05 00:12:05 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-05 00:12:05 +0400 |
commit | 79b4c0e600c2f2fe539a0602bf752b62210815d6 (patch) | |
tree | a1a8eb1cbf7962f45696b8d0b7b244302c89390f /source/blender/editors/interface/interface_intern.h | |
parent | 2a08c0dc5620dd126da54f36a48402d34f83a00c (diff) |
UI: buttons that open menus now align to the menu rather than looking disconnected.
Also fixed some cases where the menu was offset 1 or 2 pixels wrong, though not
quite all of them, still off by 1 pixel sometimes.
http://www.pasteall.org/pic/show.php?id=38478
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index e345296b69f..b4b0686d6fc 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -315,7 +315,6 @@ struct uiBlock { char tooltipdisabled; /* to avoid tooltip after click */ char endblock; /* uiEndBlock done? */ - float xofs, yofs; /* offset to parent button */ eBlockBoundsCalc bounds_type; /* for doing delayed */ int mx, my; int bounds, minbounds; /* for doing delayed */ @@ -419,6 +418,9 @@ struct uiPopupBlockHandle { int menuretval; float retvalue; float retvec[4]; + + /* menu direction */ + int direction; }; uiBlock *ui_block_func_COLOR(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but); @@ -481,6 +483,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, struct uiWidgetColors *wc extern void ui_button_activate_do(struct bContext *C, struct ARegion *ar, uiBut *but); extern void ui_button_active_free(const struct bContext *C, uiBut *but); extern int ui_button_is_active(struct ARegion *ar); +extern int ui_button_open_menu_direction(uiBut *but); /* interface_widgets.c */ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3); |