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:
authorHarley Acheson <harley.acheson@gmail.com>2019-10-01 02:38:40 +0300
committerHarley Acheson <harley.acheson@gmail.com>2019-10-01 02:46:05 +0300
commit4101d3e4003a6745fec11cdc86ca0f721bd7cf7e (patch)
treecfc912fb7ce9020f4360bb64d354c2c663cb38b8 /source/blender/windowmanager/intern/wm_cursors.c
parent60a827a2a9917c142a66e932e9009948ea6b7b78 (diff)
UI: Changes to Paint Cursors
Changes to cursors that can be used for painting and sculpting. Differential Revision: https://developer.blender.org/D5951 Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/windowmanager/intern/wm_cursors.c')
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c138
1 files changed, 69 insertions, 69 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index 96353fc472a..4b1abeceebb 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -107,9 +107,9 @@ static GHOST_TStandardCursor convert_to_ghost_standard_cursor(WMCursorType curs)
return GHOST_kStandardCursorUpArrow;
case WM_CURSOR_S_ARROW:
return GHOST_kStandardCursorDownArrow;
- case WM_CURSOR_CROSSA:
+ case WM_CURSOR_PAINT:
return GHOST_kStandardCursorCrosshairA;
- case WM_CURSOR_CROSSB:
+ case WM_CURSOR_DOT:
return GHOST_kStandardCursorCrosshairB;
case WM_CURSOR_CROSSC:
return GHOST_kStandardCursorCrosshairC;
@@ -752,54 +752,54 @@ void wm_init_cursor_data(void)
BlenderCursor[WM_CURSOR_CROSS] = &CrossCursor;
END_CURSOR_BLOCK;
- /****************** Crosshair Cursor A ************************/
+ /****************** Painting Cursor ************************/
BEGIN_CURSOR_BLOCK;
- static char crossa_sbm[] = {
- 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x1e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
- 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ static char paint_sbm[] = {
+ 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x8f, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
};
- static char crossa_smsk[] = {
- 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x80,
- 0x00, 0x1e, 0x3c, 0x3f, 0x7e, 0x1e, 0x3c, 0x80, 0x00, 0xc0, 0x01,
- 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00,
+ static char paint_smsk[] = {
+ 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x8f, 0x78, 0xcf, 0x79, 0x8f, 0x78, 0x00, 0x00, 0x00, 0x00,
+ 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00,
};
- static char crossa_lbm[] = {
+ static char paint_lbm[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,
0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,
- 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
- 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xfe, 0x0f, 0xf0, 0x7f, 0xfe, 0x0f, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,
- 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xfe, 0x80, 0x01, 0x7f, 0xfe, 0x80, 0x01, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
};
- static char crossa_lmsk[] = {
+ static char paint_lmsk[] = {
0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03,
0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0,
- 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
- 0xc0, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0xf0, 0x7f,
- 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xfe, 0x0f, 0xf0, 0x7f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0,
- 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x80, 0x01, 0x7f,
+ 0xff, 0xc1, 0x83, 0xff, 0xff, 0xc1, 0x83, 0xff, 0xfe, 0x80, 0x01, 0x7f, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00,
0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00,
};
- static BCursor CrossCursorA = {
+ static BCursor PaintCursor = {
/* small */
- crossa_sbm,
- crossa_smsk,
+ paint_sbm,
+ paint_smsk,
16,
16,
7,
7,
/* big */
- crossa_lbm,
- crossa_lmsk,
+ paint_lbm,
+ paint_lmsk,
32,
32,
15,
@@ -808,69 +808,69 @@ void wm_init_cursor_data(void)
false,
};
- BlenderCursor[WM_CURSOR_CROSSA] = &CrossCursorA;
+ BlenderCursor[WM_CURSOR_PAINT] = &PaintCursor;
END_CURSOR_BLOCK;
- /********************** Diagonal Cross Cursor B ***********************/
+ /********************** Dot Cursor ***********************/
BEGIN_CURSOR_BLOCK;
- static char crossb_sbm[] = {
- 0x00, 0x00, 0x02, 0x40, 0x04, 0x20, 0x08, 0x10, 0x10, 0x08, 0x20,
- 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04,
- 0x10, 0x08, 0x08, 0x10, 0x04, 0x20, 0x02, 0x40, 0x00, 0x00,
- };
-
- static char crossb_smsk[] = {
- 0x03, 0xc0, 0x07, 0xe0, 0x0e, 0x70, 0x1c, 0x38, 0x38, 0x1c, 0x70,
- 0x0e, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x70, 0x0e,
- 0x38, 0x1c, 0x1c, 0x38, 0x0e, 0x70, 0x07, 0xe0, 0x03, 0xc0,
- };
- static char crossb_lbm[] = {
- 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00,
- 0x10, 0x10, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x02, 0x80, 0x00,
- 0x00, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00,
- 0x08, 0x10, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ static char dot_sbm[] = {
+ 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x8f, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
+ };
+
+ static char dot_smsk[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ };
+ static char dot_lbm[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x02,
- 0x40, 0x00, 0x00, 0x01, 0x80, 0x00, 0x80, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x20,
- 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x20,
- 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
+ 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
- static char crossb_lmsk[] = {
- 0x07, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x3e, 0x00, 0x00,
- 0x7c, 0x7c, 0x00, 0x00, 0x3e, 0xf8, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x80, 0x0f, 0xe0, 0x03,
- 0xc0, 0x07, 0xc0, 0x07, 0xe0, 0x03, 0x80, 0x0f, 0xf0, 0x01, 0x00, 0x1f, 0xf8, 0x00, 0x00,
- 0x3e, 0x7c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1c,
- 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 0x3e, 0x7c, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x80, 0x0f,
- 0xf0, 0x01, 0xc0, 0x07, 0xe0, 0x03, 0xe0, 0x03, 0xc0, 0x07, 0xf0, 0x01, 0x80, 0x0f, 0xf8,
- 0x00, 0x00, 0x1f, 0x7c, 0x00, 0x00, 0x3e, 0x3e, 0x00, 0x00, 0x7c, 0x1f, 0x00, 0x00, 0xf8,
- 0x0f, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xe0,
+ static char dot_lmsk[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00,
+ 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
- static BCursor CrossCursorB = {
+ static BCursor DotCursor = {
/* small */
- crossb_sbm,
- crossb_smsk,
+ dot_sbm,
+ dot_smsk,
16,
16,
7,
7,
/* big */
- crossb_lbm,
- crossb_lmsk,
+ dot_lbm,
+ dot_lmsk,
32,
32,
- 15,
- 15,
+ 14,
+ 14,
/* don't invert color */
false,
};
- BlenderCursor[WM_CURSOR_CROSSB] = &CrossCursorB;
+ BlenderCursor[WM_CURSOR_DOT] = &DotCursor;
END_CURSOR_BLOCK;
- /************* Minimal Cross Cursor C ***************/
+ /************* Minimal Crosshair Cursor ***************/
BEGIN_CURSOR_BLOCK;
static char crossc_sbm[] = {
0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,