diff options
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_interpolate.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_interpolate.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index e2d70803695..cc30d7ec266 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -352,32 +352,33 @@ static void gpencil_mouse_update_shift(tGPDinterpolate *tgpi, wmOperator *op, co } /* Helper: Draw status message while the user is running the operator */ -static void gpencil_interpolate_status_indicators(tGPDinterpolate *p) +static void gpencil_interpolate_status_indicators(bContext *C, tGPDinterpolate *p) { Scene *scene = p->scene; char status_str[UI_MAX_DRAW_STR]; char msg_str[UI_MAX_DRAW_STR]; - BLI_strncpy(msg_str, IFACE_("GPencil Interpolation: ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/MOVE to adjust factor"), UI_MAX_DRAW_STR); + BLI_strncpy(msg_str, IFACE_("GPencil Interpolation: "), UI_MAX_DRAW_STR); if (hasNumInput(&p->num)) { char str_offs[NUM_STR_REP_LEN]; outputNumInput(&p->num, str_offs, &scene->unit); - BLI_snprintf(status_str, sizeof(status_str), "%s: %s", msg_str, str_offs); + BLI_snprintf(status_str, sizeof(status_str), "%s%s", msg_str, str_offs); } else { - BLI_snprintf(status_str, sizeof(status_str), "%s: %d %%", msg_str, (int)((p->init_factor + p->shift) * 100.0f)); + BLI_snprintf(status_str, sizeof(status_str), "%s%d %%", msg_str, (int)((p->init_factor + p->shift) * 100.0f)); } - ED_area_headerprint(p->sa, status_str); + ED_area_status_text(p->sa, status_str); + ED_workspace_status_text(C, IFACE_("ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/MOVE to adjust factor")); } /* Update screen and stroke */ static void gpencil_interpolate_update(bContext *C, wmOperator *op, tGPDinterpolate *tgpi) { /* update shift indicator in header */ - gpencil_interpolate_status_indicators(tgpi); + gpencil_interpolate_status_indicators(C, tgpi); /* apply... */ tgpi->shift = RNA_float_get(op->ptr, "shift"); /* update points position */ @@ -403,7 +404,8 @@ static void gpencil_interpolate_exit(bContext *C, wmOperator *op) } /* clear status message area */ - ED_area_headerprint(tgpi->sa, NULL); + ED_area_status_text(tgpi->sa, NULL); + ED_workspace_status_text(C, NULL); /* finally, free memory used by temp data */ for (tgpil = tgpi->ilayers.first; tgpil; tgpil = tgpil->next) { @@ -526,7 +528,7 @@ static int gpencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent WM_cursor_modal_set(win, BC_EW_SCROLLCURSOR); /* update shift indicator in header */ - gpencil_interpolate_status_indicators(tgpi); + gpencil_interpolate_status_indicators(C, tgpi); WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL); /* add a modal handler for this operator */ @@ -550,7 +552,8 @@ static int gpencil_interpolate_modal(bContext *C, wmOperator *op, const wmEvent case RETKEY: { /* return to normal cursor and header status */ - ED_area_headerprint(tgpi->sa, NULL); + ED_area_status_text(tgpi->sa, NULL); + ED_workspace_status_text(C, NULL); WM_cursor_modal_restore(win); /* insert keyframes as required... */ @@ -585,7 +588,8 @@ static int gpencil_interpolate_modal(bContext *C, wmOperator *op, const wmEvent case RIGHTMOUSE: { /* return to normal cursor and header status */ - ED_area_headerprint(tgpi->sa, NULL); + ED_area_status_text(tgpi->sa, NULL); + ED_workspace_status_text(C, NULL); WM_cursor_modal_restore(win); /* clean up temp data */ |