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/gpencil | |
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/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/gpencil/gpencil.c b/source/blender/editors/gpencil/gpencil.c index 799c9db6d94..96fe598ecae 100644 --- a/source/blender/editors/gpencil/gpencil.c +++ b/source/blender/editors/gpencil/gpencil.c @@ -770,7 +770,8 @@ static void gp_strokepoint_convertcoords (bGPDstroke *gps, bGPDspoint *pt, float VecCopyf(p3d, &pt->x); } else { - short mval[2], mx, my; + short mval[2]; + int mx, my; float *fp= give_cursor(NULL, NULL); // XXX should be scene, v3d float dvec[3]; @@ -778,15 +779,13 @@ static void gp_strokepoint_convertcoords (bGPDstroke *gps, bGPDspoint *pt, float if (gps->flag & GP_STROKE_2DSPACE) { // XXX // View2D *v2d= spacelink_get_view2d(curarea->spacedata.first); - // UI_view2d_view_to_region(v2d, pt->x, pt->y, mval, mval+1); + // UI_view2d_view_to_region(v2d, pt->x, pt->y, &mx, &my); } else { // XXX - // mval[0]= (short)(pt->x / 1000 * curarea->winx); - // mval[1]= (short)(pt->y / 1000 * curarea->winy); + // mx= (short)(pt->x / 1000 * curarea->winx); + // my= (short)(pt->y / 1000 * curarea->winy); } - mx= mval[0]; - my= mval[1]; /* convert screen coordinate to 3d coordinates * - method taken from editview.c - mouse_cursor() @@ -1551,7 +1550,7 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, short mval[], short mvalo[], { bGPDspoint *pt1, *pt2; View3D *v3d= NULL; - short x0=0, y0=0, x1=0, y1=0; + int x0=0, y0=0, x1=0, y1=0; short xyval[2]; int i; |