diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-15 07:13:38 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-15 07:13:38 +0300 |
commit | f08032e8f967e5c5893116fc24c82a18da7bdf79 (patch) | |
tree | 2613d1df53164faebf39e5b54b7c8c968d0e255c /source/blender/editors/interface/interface_regions.c | |
parent | ad50055610298cff793cdde1c01e1bc126398395 (diff) |
UI: various changes
* View2D to region now returns ints instead of shorts.
* Use "Numpad" instead of "Pad" in automatic keymap menu info.
* Menus can now use buttons other than BUTM and SEPR, in
particular TOG and ROW are now supported instead of flipping
bits manually.
* Added a simpler uiDefMenu* api for making menus now, and it
only supports Operator and RNA buttons at the moment, will be
used in next commit. Not sure how this will evolve .. makes
menu code look cleaner anyways.
* Ensure that interface code doesn't crash when getting unknown
Operators and RNA properties, and display their buttons grayed
out in that case.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 16641973b02..0d8a56ad728 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -347,11 +347,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) if(butregion) { /* XXX temp, region v2ds can be empty still */ if(butregion->v2d.cur.xmin != butregion->v2d.cur.xmax) { - short tx, ty; - UI_view2d_to_region_no_clip(&butregion->v2d, x1, y1, &tx, &ty); - x1= (int)tx; y1= (int)ty; - UI_view2d_to_region_no_clip(&butregion->v2d, x2, y2, &tx, &ty); - x2= (int)tx; y2= (int)ty; + UI_view2d_to_region_no_clip(&butregion->v2d, x1, y1, &x1, &y1); + UI_view2d_to_region_no_clip(&butregion->v2d, x2, y2, &x2, &y2); } x1 += butregion->winrct.xmin; |