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/gizmo_library | |
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/gizmo_library')
4 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c index 1a132c2957a..ecbc503e084 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c @@ -258,9 +258,9 @@ static int gizmo_button2d_test_select(bContext *C, wmGizmo *gz, const int mval[2 static int gizmo_button2d_cursor_get(wmGizmo *gz) { if (RNA_boolean_get(gz->ptr, "show_drag")) { - return BC_NSEW_SCROLLCURSOR; + return WM_CURSOR_NSEW_SCROLL; } - return CURSOR_STD; + return WM_CURSOR_DEFAULT; } static void gizmo_button2d_free(wmGizmo *gz) diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c index ba3b8c2602e..ef4fd23b64d 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c @@ -752,30 +752,30 @@ static int gizmo_cage2d_get_cursor(wmGizmo *gz) int highlight_part = gz->highlight_part; if (gz->parent_gzgroup->type->flag & WM_GIZMOGROUPTYPE_3D) { - return BC_NSEW_SCROLLCURSOR; + return WM_CURSOR_NSEW_SCROLL; } switch (highlight_part) { case ED_GIZMO_CAGE2D_PART_TRANSLATE: - return BC_NSEW_SCROLLCURSOR; + return WM_CURSOR_NSEW_SCROLL; case ED_GIZMO_CAGE2D_PART_SCALE_MIN_X: case ED_GIZMO_CAGE2D_PART_SCALE_MAX_X: - return CURSOR_X_MOVE; + return WM_CURSOR_X_MOVE; case ED_GIZMO_CAGE2D_PART_SCALE_MIN_Y: case ED_GIZMO_CAGE2D_PART_SCALE_MAX_Y: - return CURSOR_Y_MOVE; + return WM_CURSOR_Y_MOVE; /* TODO diagonal cursor */ case ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MIN_Y: case ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MIN_Y: - return BC_NSEW_SCROLLCURSOR; + return WM_CURSOR_NSEW_SCROLL; case ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MAX_Y: case ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MAX_Y: - return BC_NSEW_SCROLLCURSOR; + return WM_CURSOR_NSEW_SCROLL; case ED_GIZMO_CAGE2D_PART_ROTATE: - return BC_CROSSCURSOR; + return WM_CURSOR_CROSS; default: - return CURSOR_STD; + return WM_CURSOR_DEFAULT; } } diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c index 406f76bc65e..723be3cfe6b 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c @@ -424,10 +424,10 @@ static void gizmo_cage3d_draw(const bContext *C, wmGizmo *gz) static int gizmo_cage3d_get_cursor(wmGizmo *gz) { if (gz->parent_gzgroup->type->flag & WM_GIZMOGROUPTYPE_3D) { - return BC_NSEW_SCROLLCURSOR; + return WM_CURSOR_NSEW_SCROLL; } - return CURSOR_STD; + return WM_CURSOR_DEFAULT; } typedef struct RectTransformInteraction { diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c index 37ee95d5058..5342f8695b2 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c @@ -412,7 +412,7 @@ static void gizmo_move_property_update(wmGizmo *gz, wmGizmoProperty *gz_prop) static int gizmo_move_cursor_get(wmGizmo *UNUSED(gz)) { - return BC_NSEW_SCROLLCURSOR; + return WM_CURSOR_NSEW_SCROLL; } /* -------------------------------------------------------------------- */ |