Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2006-06-15 18:22:59 +0400
committerMatt Ebb <matt@mke3.net>2006-06-15 18:22:59 +0400
commitd5b3e75652de955c24ec06901991927332d4e22b (patch)
tree64eb99e6298252a51c98777dcb49eceaf08f5d9c /source/blender/src/cursors.c
parent986f999671bad332b6bedc9e5ec8160d71cb515a (diff)
* Added a better mouse pointer for the eyedropper tool (thanks Bart) and also
some 2d scroll pointers
Diffstat (limited to 'source/blender/src/cursors.c')
-rw-r--r--source/blender/src/cursors.c195
1 files changed, 191 insertions, 4 deletions
diff --git a/source/blender/src/cursors.c b/source/blender/src/cursors.c
index 4d8897cbfcd..ea10d2e9b3e 100644
--- a/source/blender/src/cursors.c
+++ b/source/blender/src/cursors.c
@@ -71,7 +71,14 @@ in mask with 0's.
Setting big_bm=NULL disables the large version of the cursor.
-******************************************************************* */
+*******************************************************************
+
+There is a nice Python GUI utility that can be used for drawing cursors in
+this format in the Blender source distribution, in
+blender/source/tools/MakeCursor.py . Start it with $ python MakeCursor.py
+It will copy its output to the console when you press 'Do it'.
+
+*/
/* Because defining a cursor mixes declarations and executable code
each cursor needs it's own scoping block or it would be split up
@@ -574,7 +581,7 @@ static char vloop_lmsk[]={
END_CURSOR_BLOCK
- /********************** EditCross Cursor ***********************/
+ /********************** TextEdit Cursor ***********************/
BEGIN_CURSOR_BLOCK
static char textedit_sbm[]={
0xe0, 0x03, 0x10, 0x04, 0x60, 0x03, 0x40, 0x01,
@@ -607,7 +614,7 @@ BEGIN_CURSOR_BLOCK
END_CURSOR_BLOCK
- /********************** EditCross Cursor ***********************/
+ /********************** Paintbrush Cursor ***********************/
BEGIN_CURSOR_BLOCK
static char paintbrush_sbm[]={
@@ -645,8 +652,188 @@ BEGIN_CURSOR_BLOCK
BlenderCursor[BC_PAINTBRUSHCURSOR]=&PaintBrushCursor;
END_CURSOR_BLOCK
- /********************** Put the cursors in the array ***********************/
+
+/********************** Hand Cursor ***********************/
+BEGIN_CURSOR_BLOCK
+
+static char hand_sbm[]={
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x80, 0x0d,
+ 0x98, 0x6d, 0x98, 0x6d, 0xb0, 0x6d, 0xb0, 0x6d,
+ 0xe0, 0x6f, 0xe6, 0x7f, 0xee, 0x7f, 0xfc, 0x3f,
+ 0xf8, 0x3f, 0xf0, 0x1f, 0xc0, 0x1f, 0xc0, 0x1f,
+};
+
+static char hand_smsk[]={
+ 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0xd8, 0x7f,
+ 0xfc, 0xff, 0xfc, 0xff, 0xf8, 0xff, 0xf8, 0xff,
+ 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f,
+ 0xfc, 0x7f, 0xf8, 0x3f, 0xf0, 0x3f, 0xe0, 0x3f,
+};
+
+
+static BCursor HandCursor = {
+ /*small*/
+ hand_sbm, hand_smsk,
+ 16, 16,
+ 8, 8,
+ /*big*/
+ NULL, NULL,
+ 32,32,
+ 15, 15,
+ /*color*/
+ BC_BLACK, BC_WHITE
+};
+
+BlenderCursor[BC_HANDCURSOR]=&HandCursor;
+
+END_CURSOR_BLOCK
+
+/********************** NSEW Scroll Cursor ***********************/
+BEGIN_CURSOR_BLOCK
+
+static char nsewscroll_sbm[]={
+ 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0e, 0x70,
+ 0x0e, 0x70, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00,
+ 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00,
+};
+
+static char nsewscroll_smsk[]={
+ 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xe0, 0x07,
+ 0xc0, 0x03, 0x0c, 0x30, 0x1e, 0x78, 0x1f, 0xf8,
+ 0x1f, 0xf8, 0x1e, 0x78, 0x0c, 0x30, 0xc0, 0x03,
+ 0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01,
+};
+
+
+static BCursor NSEWScrollCursor = {
+ /*small*/
+ nsewscroll_sbm, nsewscroll_smsk,
+ 16, 16,
+ 8, 8,
+ /*big*/
+ NULL, NULL,
+ 32,32,
+ 15, 15,
+ /*color*/
+ BC_BLACK, BC_WHITE
+};
+
+BlenderCursor[BC_NSEW_SCROLLCURSOR]=&NSEWScrollCursor;
+
+END_CURSOR_BLOCK
+
+
+/********************** NS Scroll Cursor ***********************/
+BEGIN_CURSOR_BLOCK
+
+static char nsscroll_sbm[]={
+ 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00,
+};
+
+static char nsscroll_smsk[]={
+ 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xe0, 0x07,
+ 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03,
+ 0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01,
+};
+
+
+static BCursor NSScrollCursor = {
+ /*small*/
+ nsscroll_sbm, nsscroll_smsk,
+ 16, 16,
+ 8, 8,
+ /*big*/
+ NULL, NULL,
+ 32,32,
+ 15, 15,
+ /*color*/
+ BC_BLACK, BC_WHITE
+};
+
+BlenderCursor[BC_NS_SCROLLCURSOR]=&NSScrollCursor;
+
+END_CURSOR_BLOCK
+
+
+/********************** EW Scroll Cursor ***********************/
+BEGIN_CURSOR_BLOCK
+
+static char ewscroll_sbm[]={
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0e, 0x70,
+ 0x0e, 0x70, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+static char ewscroll_smsk[]={
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x30, 0x1e, 0x78, 0x1f, 0xf8,
+ 0x1f, 0xf8, 0x1e, 0x78, 0x0c, 0x30, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+
+static BCursor EWScrollCursor = {
+ /*small*/
+ ewscroll_sbm, ewscroll_smsk,
+ 16, 16,
+ 8, 8,
+ /*big*/
+ NULL, NULL,
+ 32,32,
+ 15, 15,
+ /*color*/
+ BC_BLACK, BC_WHITE
+};
+
+BlenderCursor[BC_EW_SCROLLCURSOR]=&EWScrollCursor;
+
+END_CURSOR_BLOCK
+
+/********************** Eyedropper Cursor ***********************/
+BEGIN_CURSOR_BLOCK
+
+static char eyedropper_sbm[]={
+ 0x00, 0x30, 0x00, 0x48, 0x00, 0x85, 0x80, 0x82,
+ 0x40, 0x40, 0x80, 0x20, 0x40, 0x11, 0xa0, 0x23,
+ 0xd0, 0x15, 0xe8, 0x0a, 0x74, 0x01, 0xb4, 0x00,
+ 0x4a, 0x00, 0x35, 0x00, 0x08, 0x00, 0x04, 0x00,
+};
+
+static char eyedropper_smsk[]={
+ 0x00, 0x30, 0x00, 0x78, 0x00, 0xfd, 0x80, 0xff,
+ 0xc0, 0x7f, 0x80, 0x3f, 0xc0, 0x1f, 0xe0, 0x3f,
+ 0xf0, 0x1f, 0xf8, 0x0b, 0xfc, 0x01, 0xfc, 0x00,
+ 0x7e, 0x00, 0x3f, 0x00, 0x0c, 0x00, 0x04, 0x00,
+};
+
+
+static BCursor EyedropperCursor = {
+ /*small*/
+ eyedropper_sbm, eyedropper_smsk,
+ 16, 16,
+ 1, 15,
+ /*big*/
+ NULL, NULL,
+ 32,32,
+ 15, 15,
+ /*color*/
+ BC_BLACK, BC_WHITE
+};
+
+BlenderCursor[BC_EYEDROPPER_CURSOR]=&EyedropperCursor;
+
+END_CURSOR_BLOCK
+
+/********************** Put the cursors in the array ***********************/
+
+
}