WM: refresh custom cursors designs, add a few more cursors

Cursors designed by Duarte Farrajota Ramos.

Also fixes misnamed vertical and horizontal split cursors.

Ref D5197
This commit is contained in:
2019-09-26 14:31:50 +02:00
committed by Brecht Van Lommel
parent b29ad7c91a
commit 583beea3ee
3 changed files with 1061 additions and 417 deletions

View File

@@ -1041,7 +1041,7 @@ static int actionzone_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (BKE_screen_find_area_xy(sc, SPACE_TYPE_ANY, event->x, event->y) == sad->sa1) { if (BKE_screen_find_area_xy(sc, SPACE_TYPE_ANY, event->x, event->y) == sad->sa1) {
/* Same area, so possible split. */ /* Same area, so possible split. */
WM_cursor_set( WM_cursor_set(
win, (ELEM(sad->gesture_dir, 'n', 's')) ? WM_CURSOR_V_SPLIT : WM_CURSOR_H_SPLIT); win, (ELEM(sad->gesture_dir, 'n', 's')) ? WM_CURSOR_H_SPLIT : WM_CURSOR_V_SPLIT);
is_gesture = (delta_max > split_threshold); is_gesture = (delta_max > split_threshold);
} }
else { else {
@@ -2119,7 +2119,7 @@ static void area_split_preview_update_cursor(bContext *C, wmOperator *op)
{ {
wmWindow *win = CTX_wm_window(C); wmWindow *win = CTX_wm_window(C);
int dir = RNA_enum_get(op->ptr, "direction"); int dir = RNA_enum_get(op->ptr, "direction");
WM_cursor_set(win, (dir == 'n' || dir == 's') ? WM_CURSOR_V_SPLIT : WM_CURSOR_H_SPLIT); WM_cursor_set(win, (dir == 'n' || dir == 's') ? WM_CURSOR_H_SPLIT : WM_CURSOR_V_SPLIT);
} }
/* UI callback, adds new handler */ /* UI callback, adds new handler */

File diff suppressed because it is too large Load Diff

View File

@@ -80,6 +80,12 @@ typedef enum WMCursorType {
WM_CURSOR_E_ARROW, WM_CURSOR_E_ARROW,
WM_CURSOR_W_ARROW, WM_CURSOR_W_ARROW,
WM_CURSOR_STOP, WM_CURSOR_STOP,
WM_CURSOR_CROSSA,
WM_CURSOR_CROSSB,
WM_CURSOR_CROSSC,
WM_CURSOR_ERASER,
WM_CURSOR_ZOOM_IN,
WM_CURSOR_ZOOM_OUT,
WM_CURSOR_NONE, WM_CURSOR_NONE,