diff --git a/applications/bt/bt_hid_app/bt_hid.c b/applications/bt/bt_hid_app/bt_hid.c old mode 100755 new mode 100644 index 3189042c..0827bd0a --- a/applications/bt/bt_hid_app/bt_hid.c +++ b/applications/bt/bt_hid_app/bt_hid.c @@ -89,8 +89,7 @@ BtHid* bt_hid_app_alloc() { app->submenu, "Keynote", BtHidSubmenuIndexKeynote, bt_hid_submenu_callback, app); submenu_add_item( app->submenu, "Keyboard", BtHidSubmenuIndexKeyboard, bt_hid_submenu_callback, app); - submenu_add_item( - app->submenu, "Media Player", BtHidSubmenuIndexMedia, bt_hid_submenu_callback, app); + submenu_add_item(app->submenu, "Media", BtHidSubmenuIndexMedia, bt_hid_submenu_callback, app); submenu_add_item(app->submenu, "Mouse", BtHidSubmenuIndexMouse, bt_hid_submenu_callback, app); view_set_previous_callback(submenu_get_view(app->submenu), bt_hid_exit); view_dispatcher_add_view( @@ -134,7 +133,7 @@ BtHid* bt_hid_app_alloc() { app->view_dispatcher, BtHidViewMouse, bt_hid_mouse_get_view(app->bt_hid_mouse)); // TODO switch to menu after Media is done - app->view_id = BtHidViewKeynote; + app->view_id = BtHidViewSubmenu; view_dispatcher_switch_to_view(app->view_dispatcher, app->view_id); return app; diff --git a/applications/bt/bt_hid_app/views/bt_hid_keynote.c b/applications/bt/bt_hid_app/views/bt_hid_keynote.c index 60a1ebc0..ea4ee16f 100755 --- a/applications/bt/bt_hid_app/views/bt_hid_keynote.c +++ b/applications/bt/bt_hid_app/views/bt_hid_keynote.c @@ -43,7 +43,10 @@ static void bt_hid_keynote_draw_callback(Canvas* canvas, void* context) { } canvas_set_font(canvas, FontPrimary); elements_multiline_text_aligned(canvas, 17, 3, AlignLeft, AlignTop, "Keynote"); + + canvas_draw_icon(canvas, 68, 2, &I_Pin_back_arrow_10x8); canvas_set_font(canvas, FontSecondary); + elements_multiline_text_aligned(canvas, 127, 3, AlignRight, AlignTop, "Hold to exit"); // Up canvas_draw_icon(canvas, 21, 24, &I_Button_18x18); @@ -97,8 +100,8 @@ static void bt_hid_keynote_draw_callback(Canvas* canvas, void* context) { elements_slightly_rounded_box(canvas, 66, 47, 60, 13); canvas_set_color(canvas, ColorWhite); } - canvas_draw_icon(canvas, 110, 49, &I_Ok_btn_9x9); - elements_multiline_text_aligned(canvas, 76, 56, AlignLeft, AlignBottom, "Back"); + canvas_draw_icon(canvas, 74, 49, &I_Pin_back_arrow_10x8); + elements_multiline_text_aligned(canvas, 91, 57, AlignLeft, AlignBottom, "Back"); } static void bt_hid_keynote_process(BtHidKeynote* bt_hid_keynote, InputEvent* event) { diff --git a/applications/bt/bt_hid_app/views/bt_hid_media.c b/applications/bt/bt_hid_app/views/bt_hid_media.c index b384f47c..258ea0a4 100755 --- a/applications/bt/bt_hid_app/views/bt_hid_media.c +++ b/applications/bt/bt_hid_app/views/bt_hid_media.c @@ -49,7 +49,9 @@ static void bt_hid_media_draw_callback(Canvas* canvas, void* context) { // Up if(model->up_pressed) { + canvas_set_bitmap_mode(canvas, 1); canvas_draw_icon(canvas, 93, 9, &I_Pressed_Button_13x13); + canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } canvas_draw_icon(canvas, 96, 12, &I_Volup_8x6); @@ -57,7 +59,9 @@ static void bt_hid_media_draw_callback(Canvas* canvas, void* context) { // Down if(model->down_pressed) { + canvas_set_bitmap_mode(canvas, 1); canvas_draw_icon(canvas, 93, 41, &I_Pressed_Button_13x13); + canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } canvas_draw_icon(canvas, 96, 45, &I_Voldwn_6x6); @@ -65,7 +69,9 @@ static void bt_hid_media_draw_callback(Canvas* canvas, void* context) { // Left if(model->left_pressed) { + canvas_set_bitmap_mode(canvas, 1); canvas_draw_icon(canvas, 77, 25, &I_Pressed_Button_13x13); + canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } bt_hid_media_draw_arrow(canvas, 82, 31, CanvasDirectionRightToLeft); @@ -74,7 +80,9 @@ static void bt_hid_media_draw_callback(Canvas* canvas, void* context) { // Right if(model->right_pressed) { + canvas_set_bitmap_mode(canvas, 1); canvas_draw_icon(canvas, 109, 25, &I_Pressed_Button_13x13); + canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } bt_hid_media_draw_arrow(canvas, 112, 31, CanvasDirectionLeftToRight); @@ -89,6 +97,12 @@ static void bt_hid_media_draw_callback(Canvas* canvas, void* context) { bt_hid_media_draw_arrow(canvas, 96, 31, CanvasDirectionLeftToRight); canvas_draw_line(canvas, 100, 29, 100, 33); canvas_draw_line(canvas, 102, 29, 102, 33); + canvas_set_color(canvas, ColorBlack); + + // Exit + canvas_draw_icon(canvas, 0, 54, &I_Pin_back_arrow_10x8); + canvas_set_font(canvas, FontSecondary); + elements_multiline_text_aligned(canvas, 13, 62, AlignLeft, AlignBottom, "Hold to exit"); } static void bt_hid_media_process_press(BtHidMedia* bt_hid_media, InputEvent* event) { diff --git a/applications/bt/bt_hid_app/views/bt_hid_mouse.c b/applications/bt/bt_hid_app/views/bt_hid_mouse.c index fb1537a2..f9d84f9f 100644 --- a/applications/bt/bt_hid_app/views/bt_hid_mouse.c +++ b/applications/bt/bt_hid_app/views/bt_hid_mouse.c @@ -36,7 +36,11 @@ static void bt_hid_mouse_draw_callback(Canvas* canvas, void* context) { canvas_set_font(canvas, FontSecondary); if(model->left_mouse_held == true) { - elements_multiline_text_aligned(canvas, 0, 60, AlignLeft, AlignBottom, "Selecting..."); + elements_multiline_text_aligned(canvas, 0, 62, AlignLeft, AlignBottom, "Selecting..."); + } else { + canvas_draw_icon(canvas, 0, 54, &I_Pin_back_arrow_10x8); + canvas_set_font(canvas, FontSecondary); + elements_multiline_text_aligned(canvas, 13, 62, AlignLeft, AlignBottom, "Hold to exit"); } // Keypad circles @@ -44,7 +48,9 @@ static void bt_hid_mouse_draw_callback(Canvas* canvas, void* context) { // Up if(model->up_pressed) { + canvas_set_bitmap_mode(canvas, 1); canvas_draw_icon(canvas, 81, 9, &I_Pressed_Button_13x13); + canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } canvas_draw_icon(canvas, 84, 10, &I_Pin_arrow_up7x9); @@ -52,7 +58,9 @@ static void bt_hid_mouse_draw_callback(Canvas* canvas, void* context) { // Down if(model->down_pressed) { + canvas_set_bitmap_mode(canvas, 1); canvas_draw_icon(canvas, 81, 41, &I_Pressed_Button_13x13); + canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } canvas_draw_icon(canvas, 84, 43, &I_Pin_arrow_down_7x9); @@ -60,7 +68,9 @@ static void bt_hid_mouse_draw_callback(Canvas* canvas, void* context) { // Left if(model->left_pressed) { + canvas_set_bitmap_mode(canvas, 1); canvas_draw_icon(canvas, 65, 25, &I_Pressed_Button_13x13); + canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } canvas_draw_icon(canvas, 67, 28, &I_Pin_arrow_left_9x7); @@ -68,7 +78,9 @@ static void bt_hid_mouse_draw_callback(Canvas* canvas, void* context) { // Right if(model->right_pressed) { + canvas_set_bitmap_mode(canvas, 1); canvas_draw_icon(canvas, 97, 25, &I_Pressed_Button_13x13); + canvas_set_bitmap_mode(canvas, 0); canvas_set_color(canvas, ColorWhite); } canvas_draw_icon(canvas, 99, 28, &I_Pin_arrow_right_9x7); @@ -76,18 +88,17 @@ static void bt_hid_mouse_draw_callback(Canvas* canvas, void* context) { // Ok if(model->left_mouse_pressed) { - canvas_draw_icon(canvas, 81, 25, &I_Pressed_Button_13x13); - canvas_set_color(canvas, ColorWhite); + canvas_draw_icon(canvas, 81, 25, &I_Ok_btn_pressed_13x13); + } else { + canvas_draw_icon(canvas, 83, 27, &I_Left_mouse_icon_9x9); } - canvas_draw_icon(canvas, 83, 27, &I_Ok_btn_9x9); - canvas_set_color(canvas, ColorBlack); // Back if(model->right_mouse_pressed) { - canvas_draw_icon(canvas, 108, 48, &I_Pressed_Button_13x13); - canvas_set_color(canvas, ColorWhite); + canvas_draw_icon(canvas, 108, 48, &I_Ok_btn_pressed_13x13); + } else { + canvas_draw_icon(canvas, 110, 50, &I_Right_mouse_icon_9x9); } - canvas_draw_icon(canvas, 110, 50, &I_Ok_btn_9x9); } static void bt_hid_mouse_process(BtHidMouse* bt_hid_mouse, InputEvent* event) { diff --git a/assets/icons/BLE/BLE_HID/Left_mouse_icon_9x9.png b/assets/icons/BLE/BLE_HID/Left_mouse_icon_9x9.png new file mode 100644 index 00000000..c533d857 Binary files /dev/null and b/assets/icons/BLE/BLE_HID/Left_mouse_icon_9x9.png differ diff --git a/assets/icons/BLE/BLE_HID/Ok_btn_pressed_13x13.png b/assets/icons/BLE/BLE_HID/Ok_btn_pressed_13x13.png new file mode 100644 index 00000000..6b46ba3a Binary files /dev/null and b/assets/icons/BLE/BLE_HID/Ok_btn_pressed_13x13.png differ diff --git a/assets/icons/BLE/BLE_HID/Right_mouse_icon_9x9.png b/assets/icons/BLE/BLE_HID/Right_mouse_icon_9x9.png new file mode 100644 index 00000000..446d7176 Binary files /dev/null and b/assets/icons/BLE/BLE_HID/Right_mouse_icon_9x9.png differ