Merge pull request #85 from mvanzanten/adding-on-the-fly-changes-ui-addition

Improve UI for added on-the-fly feature
This commit is contained in:
MX 2022-10-04 18:25:07 +03:00 committed by GitHub
commit 23e0566273
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,16 +142,17 @@ void flipfrid_scene_select_field_on_draw(Canvas* canvas, FlipFridState* context)
// Frame
//canvas_draw_frame(canvas, 0, 0, 128, 64);
// Title
canvas_set_font(canvas, FontPrimary);
canvas_draw_str_aligned(canvas, 64, 10, AlignCenter, AlignTop, "Use < > to select byte.");
canvas_set_font(canvas, FontSecondary);
canvas_draw_str_aligned(canvas, 12, 5, AlignLeft, AlignTop, "Left and right: select byte");
canvas_draw_str_aligned(canvas, 12, 15, AlignLeft, AlignTop, "Up and down: adjust byte");
char msg_index[18];
canvas_set_font(canvas, FontPrimary);
snprintf(msg_index, sizeof(msg_index), "Field index : %d", context->key_index);
canvas_draw_str_aligned(canvas, 64, 26, AlignCenter, AlignTop, msg_index);
canvas_draw_str_aligned(canvas, 64, 30, AlignCenter, AlignTop, msg_index);
flipfrid_center_displayed_key(context, context->key_index);
canvas_set_font(canvas, FontSecondary);
canvas_draw_str_aligned(
canvas, 64, 44, AlignCenter, AlignTop, string_get_cstr(context->notification_msg));
canvas, 64, 45, AlignCenter, AlignTop, string_get_cstr(context->notification_msg));
}