diff options
author | Matt Ebb <matt@mke3.net> | 2006-01-30 01:25:53 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2006-01-30 01:25:53 +0300 |
commit | aa3aaaa9b6d5338dfc75ec199a2e09137742b342 (patch) | |
tree | dcff7d5e16eb9b36a39d71bafb67fa5301b7c1c3 /source | |
parent | 24446906bc81fdd7a899f352f9f3bafff8a4fd00 (diff) |
== interface ==
Two new mouse cursors (paintbrush and text I-bar) made by basse (he even made the patch!), inspired by Bart's page.
I also changed screenmain() ever so slightly, so that the standard cursor is always used when the mouse is over a window header.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/include/BIF_cursors.h | 2 | ||||
-rw-r--r-- | source/blender/include/BIF_graphics.h | 3 | ||||
-rw-r--r-- | source/blender/src/cursors.c | 72 | ||||
-rw-r--r-- | source/blender/src/ghostwinlay.c | 5 |
4 files changed, 80 insertions, 2 deletions
diff --git a/source/blender/include/BIF_cursors.h b/source/blender/include/BIF_cursors.h index c68c9b607c8..b3a285d5b86 100644 --- a/source/blender/include/BIF_cursors.h +++ b/source/blender/include/BIF_cursors.h @@ -75,6 +75,8 @@ enum { BC_BOXSELCURSOR, BC_KNIFECURSOR, BC_VLOOPCURSOR, + BC_TEXTEDITCURSOR, + BC_PAINTBRUSHCURSOR, /* --- ALWAYS LAST ----- */ BC_NUMCURSORS, }; diff --git a/source/blender/include/BIF_graphics.h b/source/blender/include/BIF_graphics.h index 05e0883e81d..51aa2ceeb01 100644 --- a/source/blender/include/BIF_graphics.h +++ b/source/blender/include/BIF_graphics.h @@ -48,7 +48,8 @@ enum { CURSOR_HELP, CURSOR_STD, CURSOR_NONE, - CURSOR_PENCIL + CURSOR_PENCIL, + CURSOR_TEXTEDIT }; void set_cursor(int curs); diff --git a/source/blender/src/cursors.c b/source/blender/src/cursors.c index f4d6c8278f7..259c1dd09d0 100644 --- a/source/blender/src/cursors.c +++ b/source/blender/src/cursors.c @@ -573,6 +573,78 @@ static char vloop_lmsk[]={ END_CURSOR_BLOCK + + /********************** EditCross Cursor ***********************/ +BEGIN_CURSOR_BLOCK + static char textedit_sbm[]={ + 0xe0, 0x03, 0x10, 0x04, 0x60, 0x03, 0x40, 0x01, + 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, + 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, + 0x40, 0x01, 0x60, 0x03, 0x10, 0x04, 0xe0, 0x03, + }; + + static char textedit_smsk[]={ + 0xe0, 0x03, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, + 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, + 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, + 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xe0, 0x03, + }; + + static BCursor TextEditCursor = { + /*small*/ + textedit_sbm, textedit_smsk, + 16, 16, + 9, 8, + /*big*/ + NULL, NULL, + 32,32, + 15, 15, + /*color*/ + BC_BLACK, BC_WHITE + }; + + BlenderCursor[BC_TEXTEDITCURSOR]=&TextEditCursor; +END_CURSOR_BLOCK + + + /********************** EditCross Cursor ***********************/ +BEGIN_CURSOR_BLOCK + static char paintbrush_sbm[]={ + + 0x00, 0xe0, 0x00, 0x98, 0x00, 0x44, 0x00, 0x42, + 0x00, 0x21, 0x80, 0x20, 0x40, 0x13, 0x40, 0x17, + 0xa0, 0x0b, 0x98, 0x05, 0x04, 0x02, 0x02, 0x01, + 0x02, 0x01, 0x02, 0x01, 0x81, 0x00, 0x7f, 0x00, + + + + }; + + static char paintbrush_smsk[]={ + 0x00, 0xe0, 0x00, 0xf8, 0x00, 0x7c, 0x00, 0x7e, + 0x00, 0x3f, 0x80, 0x3f, 0xc0, 0x1f, 0xc0, 0x1f, + 0xe0, 0x0f, 0xf8, 0x07, 0xfc, 0x03, 0xfe, 0x01, + 0xfe, 0x01, 0xfe, 0x01, 0xff, 0x00, 0x7f, 0x00, + + + }; + + static BCursor PaintBrushCursor = { + /*small*/ + paintbrush_sbm, paintbrush_smsk, + 16, 16, + 9, 8, + /*big*/ + NULL, NULL, + 32,32, + 15, 15, + /*color*/ + BC_BLACK, BC_WHITE + }; + + BlenderCursor[BC_PAINTBRUSHCURSOR]=&PaintBrushCursor; +END_CURSOR_BLOCK + /********************** Put the cursors in the array ***********************/ } diff --git a/source/blender/src/ghostwinlay.c b/source/blender/src/ghostwinlay.c index 88beb6ea874..e28b604935a 100644 --- a/source/blender/src/ghostwinlay.c +++ b/source/blender/src/ghostwinlay.c @@ -414,8 +414,11 @@ void window_set_cursor(Window *win, int curs) { /* detect if we use system cursor or Blender cursor */ switch(curs) { + case CURSOR_TEXTEDIT: + SetBlenderCursor(BC_TEXTEDITCURSOR); + break; case CURSOR_VPAINT: - SetBlenderCursor(BC_KNIFECURSOR); + SetBlenderCursor(BC_PAINTBRUSHCURSOR); break; default: GHOST_SetCursorShape(win->ghostwin, convert_cursor(curs)); |