From 99d81640659816b98408d8072c9a5f53993ffcd1 Mon Sep 17 00:00:00 2001 From: gid9798 <30450294+gid9798@users.noreply.github.com> Date: Thu, 20 Jul 2023 20:47:29 +0300 Subject: [PATCH 1/2] HID app: KB assets --- .../external/hid_app/assets/KB_key_Alt_17x10.png | Bin 0 -> 162 bytes .../external/hid_app/assets/KB_key_Cmd_17x10.png | Bin 0 -> 163 bytes .../external/hid_app/assets/KB_key_Ctl_17x10.png | Bin 0 -> 161 bytes .../external/hid_app/assets/KB_key_Del_17x10.png | Bin 0 -> 165 bytes .../external/hid_app/assets/KB_key_Esc_17x10.png | Bin 0 -> 164 bytes .../external/hid_app/assets/KB_key_Tab_17x10.png | Bin 0 -> 163 bytes .../external/hid_app/views/hid_keyboard.c | 12 ++++++------ 7 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 applications/external/hid_app/assets/KB_key_Alt_17x10.png create mode 100644 applications/external/hid_app/assets/KB_key_Cmd_17x10.png create mode 100644 applications/external/hid_app/assets/KB_key_Ctl_17x10.png create mode 100644 applications/external/hid_app/assets/KB_key_Del_17x10.png create mode 100644 applications/external/hid_app/assets/KB_key_Esc_17x10.png create mode 100644 applications/external/hid_app/assets/KB_key_Tab_17x10.png diff --git a/applications/external/hid_app/assets/KB_key_Alt_17x10.png b/applications/external/hid_app/assets/KB_key_Alt_17x10.png new file mode 100644 index 0000000000000000000000000000000000000000..26c4f73152d43767d528a0ee9275f10bd586fb89 GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^fNn{1`*#dk*T!Hle|NocXoPQU{;wb|fr6@@E{-7*my>_| z-{1IfZz=QPue}a?b~h%P3z$2Nn{1`*#dk*T!Hle|NocXoPQU{;wb|fr4tDE{-7*my>_| z-{1J~&wjSHw+?%bFKSH8mte_feY9DSH{s|1|I!Q-gM^QtySldxsDr`N)z4*}Q$iB} DVGlC} literal 0 HcmV?d00001 diff --git a/applications/external/hid_app/assets/KB_key_Ctl_17x10.png b/applications/external/hid_app/assets/KB_key_Ctl_17x10.png new file mode 100644 index 0000000000000000000000000000000000000000..01f3157c98e45f418180364635a40bf014e8efba GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^fNn{1`*#dk*T!Hle|NocXoPQU{;wb|fr2WYE{-7*my>_| z-{1JKB9-~D-fgzFzgs!>NO$y~&tN$H|NngkhN=_7wb$6Q1%T=qJYD@<);T3K0RYu< BFsc9m literal 0 HcmV?d00001 diff --git a/applications/external/hid_app/assets/KB_key_Del_17x10.png b/applications/external/hid_app/assets/KB_key_Del_17x10.png new file mode 100644 index 0000000000000000000000000000000000000000..62bad18b5456eac36a6688692705799776f5a79f GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^fNn{1`*#dk*T!Hle|NocXoPQU{;wb|fr1*IE{-7*my>_| z-`}|KZ#whgcl#Z5ZXek2T36sRli`H>=Poi#`~QDGBSYUW;r+ep?vg+~44$rjF6*2U FngHj)G%)}G literal 0 HcmV?d00001 diff --git a/applications/external/hid_app/assets/KB_key_Esc_17x10.png b/applications/external/hid_app/assets/KB_key_Esc_17x10.png new file mode 100644 index 0000000000000000000000000000000000000000..7a9fdda225b3c1bcaee0a54a5f6714d01f0f7827 GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0vp^fNn{1`*#dk*T!Hle|NocXoPQU{;wb|fr9FuE{-7*my>_| z-`}`Uvg3R6h7@M!+vWNn{1`*#dk*T!Hle|NocXoPQU{;wb|fr4tDE{-7*my>_| z-`}|KXEpQTYK1!W8wWmolM?Y~{=_VO;M4#A=0IbGMHhM9^2!0~VDNPHb6Mw<&;$TC CXfa0s literal 0 HcmV?d00001 diff --git a/applications/external/hid_app/views/hid_keyboard.c b/applications/external/hid_app/views/hid_keyboard.c index 9d29ccf5e..1ce0285b2 100644 --- a/applications/external/hid_app/views/hid_keyboard.c +++ b/applications/external/hid_app/views/hid_keyboard.c @@ -140,17 +140,17 @@ const HidKeyboardKey hid_keyboard_keyset[ROW_COUNT][COLUMN_COUNT] = { {.width = 1, .icon = &I_ButtonRight_4x7, .value = HID_KEYBOARD_RIGHT_ARROW}, }, { - {.width = 2, .icon = NULL, .key = "Ctl", .value = HID_KEYBOARD_L_CTRL}, + {.width = 2, .icon = &I_KB_key_Ctl_17x10, .value = HID_KEYBOARD_L_CTRL}, {.width = 0, .icon = NULL, .value = HID_KEYBOARD_L_CTRL}, - {.width = 2, .icon = NULL, .key = "Alt", .value = HID_KEYBOARD_L_ALT}, + {.width = 2, .icon = &I_KB_key_Alt_17x10, .value = HID_KEYBOARD_L_ALT}, {.width = 0, .icon = NULL, .value = HID_KEYBOARD_L_ALT}, - {.width = 2, .icon = NULL, .key = "Cmd", .value = HID_KEYBOARD_L_GUI}, + {.width = 2, .icon = &I_KB_key_Cmd_17x10, .value = HID_KEYBOARD_L_GUI}, {.width = 0, .icon = NULL, .value = HID_KEYBOARD_L_GUI}, - {.width = 2, .icon = NULL, .key = "Tab", .value = HID_KEYBOARD_TAB}, + {.width = 2, .icon = &I_KB_key_Tab_17x10, .value = HID_KEYBOARD_TAB}, {.width = 0, .icon = NULL, .value = HID_KEYBOARD_TAB}, - {.width = 2, .icon = NULL, .key = "Esc", .value = HID_KEYBOARD_ESCAPE}, + {.width = 2, .icon = &I_KB_key_Esc_17x10, .value = HID_KEYBOARD_ESCAPE}, {.width = 0, .icon = NULL, .value = HID_KEYBOARD_ESCAPE}, - {.width = 2, .icon = NULL, .key = "Del", .value = HID_KEYBOARD_DELETE_FORWARD}, + {.width = 2, .icon = &I_KB_key_Del_17x10, .value = HID_KEYBOARD_DELETE_FORWARD}, {.width = 0, .icon = NULL, .value = HID_KEYBOARD_DELETE_FORWARD}, }, }; From 2ab75481756da915218a867d2735afb4acc9b980 Mon Sep 17 00:00:00 2001 From: gid9798 <30450294+gid9798@users.noreply.github.com> Date: Thu, 20 Jul 2023 20:54:32 +0300 Subject: [PATCH 2/2] HID app: rename assets --- .../assets/{OutCircles.png => OutCircles_70x51.png} | Bin .../hid_app/assets/{S_DOWN.png => S_DOWN_31x15.png} | Bin .../hid_app/assets/{S_LEFT.png => S_LEFT_15x31.png} | Bin .../assets/{S_RIGHT.png => S_RIGHT_15x31.png} | Bin .../hid_app/assets/{S_UP.png => S_UP_31x15.png} | Bin applications/external/hid_app/views/hid_media.c | 10 +++++----- applications/external/hid_app/views/hid_mouse.c | 10 +++++----- applications/external/hid_app/views/hid_tikshorts.c | 10 +++++----- 8 files changed, 15 insertions(+), 15 deletions(-) rename applications/external/hid_app/assets/{OutCircles.png => OutCircles_70x51.png} (100%) rename applications/external/hid_app/assets/{S_DOWN.png => S_DOWN_31x15.png} (100%) rename applications/external/hid_app/assets/{S_LEFT.png => S_LEFT_15x31.png} (100%) rename applications/external/hid_app/assets/{S_RIGHT.png => S_RIGHT_15x31.png} (100%) rename applications/external/hid_app/assets/{S_UP.png => S_UP_31x15.png} (100%) diff --git a/applications/external/hid_app/assets/OutCircles.png b/applications/external/hid_app/assets/OutCircles_70x51.png similarity index 100% rename from applications/external/hid_app/assets/OutCircles.png rename to applications/external/hid_app/assets/OutCircles_70x51.png diff --git a/applications/external/hid_app/assets/S_DOWN.png b/applications/external/hid_app/assets/S_DOWN_31x15.png similarity index 100% rename from applications/external/hid_app/assets/S_DOWN.png rename to applications/external/hid_app/assets/S_DOWN_31x15.png diff --git a/applications/external/hid_app/assets/S_LEFT.png b/applications/external/hid_app/assets/S_LEFT_15x31.png similarity index 100% rename from applications/external/hid_app/assets/S_LEFT.png rename to applications/external/hid_app/assets/S_LEFT_15x31.png diff --git a/applications/external/hid_app/assets/S_RIGHT.png b/applications/external/hid_app/assets/S_RIGHT_15x31.png similarity index 100% rename from applications/external/hid_app/assets/S_RIGHT.png rename to applications/external/hid_app/assets/S_RIGHT_15x31.png diff --git a/applications/external/hid_app/assets/S_UP.png b/applications/external/hid_app/assets/S_UP_31x15.png similarity index 100% rename from applications/external/hid_app/assets/S_UP.png rename to applications/external/hid_app/assets/S_UP_31x15.png diff --git a/applications/external/hid_app/views/hid_media.c b/applications/external/hid_app/views/hid_media.c index 0028ac596..8df9716c5 100644 --- a/applications/external/hid_app/views/hid_media.c +++ b/applications/external/hid_app/views/hid_media.c @@ -56,12 +56,12 @@ static void hid_media_draw_callback(Canvas* canvas, void* context) { canvas_set_font(canvas, FontSecondary); // Keypad circles - canvas_draw_icon(canvas, 58, 3, &I_OutCircles); + canvas_draw_icon(canvas, 58, 3, &I_OutCircles_70x51); // Up if(model->up_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 68, 6, &I_S_UP); + canvas_draw_icon(canvas, 68, 6, &I_S_UP_31x15); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } @@ -71,7 +71,7 @@ static void hid_media_draw_callback(Canvas* canvas, void* context) { // Down if(model->down_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 68, 36, &I_S_DOWN); + canvas_draw_icon(canvas, 68, 36, &I_S_DOWN_31x15); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } @@ -81,7 +81,7 @@ static void hid_media_draw_callback(Canvas* canvas, void* context) { // Left if(model->left_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 61, 13, &I_S_LEFT); + canvas_draw_icon(canvas, 61, 13, &I_S_LEFT_15x31); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } @@ -92,7 +92,7 @@ static void hid_media_draw_callback(Canvas* canvas, void* context) { // Right if(model->right_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT); + canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT_15x31); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } diff --git a/applications/external/hid_app/views/hid_mouse.c b/applications/external/hid_app/views/hid_mouse.c index 75df53dd1..f7de93d63 100644 --- a/applications/external/hid_app/views/hid_mouse.c +++ b/applications/external/hid_app/views/hid_mouse.c @@ -49,12 +49,12 @@ static void hid_mouse_draw_callback(Canvas* canvas, void* context) { } // Keypad circles - canvas_draw_icon(canvas, 58, 3, &I_OutCircles); + canvas_draw_icon(canvas, 58, 3, &I_OutCircles_70x51); // Up if(model->up_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 68, 6, &I_S_UP); + canvas_draw_icon(canvas, 68, 6, &I_S_UP_31x15); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } @@ -64,7 +64,7 @@ static void hid_mouse_draw_callback(Canvas* canvas, void* context) { // Down if(model->down_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 68, 36, &I_S_DOWN); + canvas_draw_icon(canvas, 68, 36, &I_S_DOWN_31x15); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } @@ -74,7 +74,7 @@ static void hid_mouse_draw_callback(Canvas* canvas, void* context) { // Left if(model->left_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 61, 13, &I_S_LEFT); + canvas_draw_icon(canvas, 61, 13, &I_S_LEFT_15x31); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } @@ -84,7 +84,7 @@ static void hid_mouse_draw_callback(Canvas* canvas, void* context) { // Right if(model->right_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT); + canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT_15x31); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } diff --git a/applications/external/hid_app/views/hid_tikshorts.c b/applications/external/hid_app/views/hid_tikshorts.c index 0e156fdf0..6965c1331 100644 --- a/applications/external/hid_app/views/hid_tikshorts.c +++ b/applications/external/hid_app/views/hid_tikshorts.c @@ -42,7 +42,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) { canvas_set_font(canvas, FontSecondary); // Keypad circles - canvas_draw_icon(canvas, 58, 3, &I_OutCircles); + canvas_draw_icon(canvas, 58, 3, &I_OutCircles_70x51); // Pause if(model->back_mouse_pressed) { @@ -57,7 +57,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) { // Up if(model->up_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 68, 6, &I_S_UP); + canvas_draw_icon(canvas, 68, 6, &I_S_UP_31x15); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } @@ -67,7 +67,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) { // Down if(model->down_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 68, 36, &I_S_DOWN); + canvas_draw_icon(canvas, 68, 36, &I_S_DOWN_31x15); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } @@ -77,7 +77,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) { // Left if(model->left_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 61, 13, &I_S_LEFT); + canvas_draw_icon(canvas, 61, 13, &I_S_LEFT_15x31); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } @@ -87,7 +87,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) { // Right if(model->right_pressed) { canvas_set_bitmap_mode(canvas, 1); - canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT); + canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT_15x31); canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); }