diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-26 15:31:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-26 15:31:48 +0300 |
commit | b29ad7c91aac1398377000c24a56038a73a3e597 (patch) | |
tree | 960a28d2f9075cb504f63747f8bef41c9e419f9b /source/blender/editors/space_node | |
parent | 3bf4610347376d326ac376e62a810e20661f1479 (diff) |
WM: clean up cursors constants and code
There was a mix of old and new constants. Now have one list of WM_CURSOR_*
cursor types, using GHOST standard cursors when available and otherwise falling
back to our custom cursors.
Ref D5197
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_relationships.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index 01a30f677a3..664349b3c3b 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -309,7 +309,7 @@ void NODE_OT_add_reroute(wmOperatorType *ot) prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); /* internal */ - RNA_def_int(ot->srna, "cursor", BC_CROSSCURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX); + RNA_def_int(ot->srna, "cursor", WM_CURSOR_CROSS, 0, INT_MAX, "Cursor", "", 0, INT_MAX); } /* ****************** Add File Node Operator ******************* */ diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 770e6dd2a9e..2081c69a1a4 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -1456,16 +1456,16 @@ static void node_draw_hidden(const bContext *C, int node_get_resize_cursor(int directions) { if (directions == 0) { - return CURSOR_STD; + return WM_CURSOR_DEFAULT; } else if ((directions & ~(NODE_RESIZE_TOP | NODE_RESIZE_BOTTOM)) == 0) { - return CURSOR_Y_MOVE; + return WM_CURSOR_Y_MOVE; } else if ((directions & ~(NODE_RESIZE_RIGHT | NODE_RESIZE_LEFT)) == 0) { - return CURSOR_X_MOVE; + return WM_CURSOR_X_MOVE; } else { - return CURSOR_EDIT; + return WM_CURSOR_EDIT; } } @@ -1474,7 +1474,7 @@ void node_set_cursor(wmWindow *win, SpaceNode *snode, float cursor[2]) bNodeTree *ntree = snode->edittree; bNode *node; bNodeSocket *sock; - int wmcursor = CURSOR_STD; + int wmcursor = WM_CURSOR_DEFAULT; if (ntree) { if (node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_IN | SOCK_OUT)) { diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index eef3f85319c..357ef31c51f 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -1103,7 +1103,7 @@ void NODE_OT_links_cut(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); /* internal */ - RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX); + RNA_def_int(ot->srna, "cursor", WM_CURSOR_KNIFE, 0, INT_MAX, "Cursor", "", 0, INT_MAX); } /* ********************** Detach links operator ***************** */ |