[FL-2668] GUI message screens update #1428
Co-authored-by: SG <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
		
							parent
							
								
									3ee592cae7
								
							
						
					
					
						commit
						f5d6a8084b
					
				| @ -27,19 +27,21 @@ void bad_usb_scene_error_on_enter(void* context) { | |||||||
|             AlignTop, |             AlignTop, | ||||||
|             FontSecondary, |             FontSecondary, | ||||||
|             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files."); |             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files."); | ||||||
|     } else if(app->error == BadUsbAppErrorCloseRpc) { |  | ||||||
|         widget_add_string_multiline_element( |  | ||||||
|             app->widget, |  | ||||||
|             63, |  | ||||||
|             10, |  | ||||||
|             AlignCenter, |  | ||||||
|             AlignTop, |  | ||||||
|             FontSecondary, |  | ||||||
|             "Disconnect from\ncompanion app\nto use this function"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|         widget_add_button_element( |         widget_add_button_element( | ||||||
|             app->widget, GuiButtonTypeLeft, "Back", bad_usb_scene_error_event_callback, app); |             app->widget, GuiButtonTypeLeft, "Back", bad_usb_scene_error_event_callback, app); | ||||||
|  |     } else if(app->error == BadUsbAppErrorCloseRpc) { | ||||||
|  |         widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64); | ||||||
|  |         widget_add_string_multiline_element( | ||||||
|  |             app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "Connection\nis active!"); | ||||||
|  |         widget_add_string_multiline_element( | ||||||
|  |             app->widget, | ||||||
|  |             3, | ||||||
|  |             30, | ||||||
|  |             AlignLeft, | ||||||
|  |             AlignTop, | ||||||
|  |             FontSecondary, | ||||||
|  |             "Disconnect from\nPC or phone to\nuse this function."); | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     view_dispatcher_switch_to_view(app->view_dispatcher, BadUsbAppViewError); |     view_dispatcher_switch_to_view(app->view_dispatcher, BadUsbAppViewError); | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,32 +1,20 @@ | |||||||
| #include "../gpio_app_i.h" | #include "../gpio_app_i.h" | ||||||
| #include "../gpio_custom_event.h" | #include "../gpio_custom_event.h" | ||||||
| 
 | 
 | ||||||
| static void gpio_scene_usb_uart_close_rpc_event_callback( |  | ||||||
|     GuiButtonType result, |  | ||||||
|     InputType type, |  | ||||||
|     void* context) { |  | ||||||
|     furi_assert(context); |  | ||||||
|     GpioApp* app = context; |  | ||||||
| 
 |  | ||||||
|     if((result == GuiButtonTypeLeft) && (type == InputTypeShort)) { |  | ||||||
|         view_dispatcher_send_custom_event(app->view_dispatcher, GpioCustomEventErrorBack); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void gpio_scene_usb_uart_close_rpc_on_enter(void* context) { | void gpio_scene_usb_uart_close_rpc_on_enter(void* context) { | ||||||
|     GpioApp* app = context; |     GpioApp* app = context; | ||||||
| 
 | 
 | ||||||
|  |     widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64); | ||||||
|  |     widget_add_string_multiline_element( | ||||||
|  |         app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "Connection\nis active!"); | ||||||
|     widget_add_string_multiline_element( |     widget_add_string_multiline_element( | ||||||
|         app->widget, |         app->widget, | ||||||
|         63, |         3, | ||||||
|         10, |         30, | ||||||
|         AlignCenter, |         AlignLeft, | ||||||
|         AlignTop, |         AlignTop, | ||||||
|         FontSecondary, |         FontSecondary, | ||||||
|         "Disconnect from\ncompanion app\nto use this function"); |         "Disconnect from\nPC or phone to\nuse this function."); | ||||||
| 
 |  | ||||||
|     widget_add_button_element( |  | ||||||
|         app->widget, GuiButtonTypeLeft, "Back", gpio_scene_usb_uart_close_rpc_event_callback, app); |  | ||||||
| 
 | 
 | ||||||
|     view_dispatcher_switch_to_view(app->view_dispatcher, GpioAppViewUsbUartCloseRpc); |     view_dispatcher_switch_to_view(app->view_dispatcher, GpioAppViewUsbUartCloseRpc); | ||||||
| } | } | ||||||
|  | |||||||
| @ -41,13 +41,13 @@ bool LfRfidAppSceneWrite::on_event(LfRfidApp* app, LfRfidApp::Event* event) { | |||||||
|         case RfidWorker::WriteResult::NotWritable: |         case RfidWorker::WriteResult::NotWritable: | ||||||
|             if(!card_not_supported) { |             if(!card_not_supported) { | ||||||
|                 auto popup = app->view_controller.get<PopupVM>(); |                 auto popup = app->view_controller.get<PopupVM>(); | ||||||
|                 popup->set_icon(0, 0, NULL); |                 popup->set_icon(72, 14, &I_DolphinFirstStart8_56x51); | ||||||
|                 popup->set_header("Still trying to write", 64, 7, AlignCenter, AlignTop); |                 popup->set_header("Still trying to write...", 64, 3, AlignCenter, AlignTop); | ||||||
|                 popup->set_text( |                 popup->set_text( | ||||||
|                     "This card may be protected\nor does not support this\ntype of writing", |                     "Make sure this\ncard is writable\nand not\nprotected.", | ||||||
|                     64, |                     3, | ||||||
|                     23, |                     17, | ||||||
|                     AlignCenter, |                     AlignLeft, | ||||||
|                     AlignTop); |                     AlignTop); | ||||||
|                 card_not_supported = true; |                 card_not_supported = true; | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -122,14 +122,10 @@ void storage_settings_scene_benchmark_on_enter(void* context) { | |||||||
|     view_dispatcher_switch_to_view(app->view_dispatcher, StorageSettingsViewDialogEx); |     view_dispatcher_switch_to_view(app->view_dispatcher, StorageSettingsViewDialogEx); | ||||||
| 
 | 
 | ||||||
|     if(sd_status != FSE_OK) { |     if(sd_status != FSE_OK) { | ||||||
|         dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 10, AlignCenter, AlignCenter); |         dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51); | ||||||
|  |         dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 3, AlignCenter, AlignTop); | ||||||
|         dialog_ex_set_text( |         dialog_ex_set_text( | ||||||
|             dialog_ex, |             dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop); | ||||||
|             "If an SD card is inserted,\r\npull it out and reinsert it", |  | ||||||
|             64, |  | ||||||
|             32, |  | ||||||
|             AlignCenter, |  | ||||||
|             AlignCenter); |  | ||||||
|         dialog_ex_set_center_button_text(dialog_ex, "Ok"); |         dialog_ex_set_center_button_text(dialog_ex, "Ok"); | ||||||
|     } else { |     } else { | ||||||
|         storage_settings_scene_benchmark(app); |         storage_settings_scene_benchmark(app); | ||||||
|  | |||||||
| @ -14,14 +14,10 @@ void storage_settings_scene_format_confirm_on_enter(void* context) { | |||||||
|     FS_Error sd_status = storage_sd_status(app->fs_api); |     FS_Error sd_status = storage_sd_status(app->fs_api); | ||||||
| 
 | 
 | ||||||
|     if(sd_status == FSE_NOT_READY) { |     if(sd_status == FSE_NOT_READY) { | ||||||
|         dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 10, AlignCenter, AlignCenter); |         dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51); | ||||||
|  |         dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 3, AlignCenter, AlignTop); | ||||||
|         dialog_ex_set_text( |         dialog_ex_set_text( | ||||||
|             dialog_ex, |             dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop); | ||||||
|             "If an SD card is inserted,\r\npull it out and reinsert it", |  | ||||||
|             64, |  | ||||||
|             32, |  | ||||||
|             AlignCenter, |  | ||||||
|             AlignCenter); |  | ||||||
|         dialog_ex_set_center_button_text(dialog_ex, "Ok"); |         dialog_ex_set_center_button_text(dialog_ex, "Ok"); | ||||||
|     } else { |     } else { | ||||||
|         dialog_ex_set_header(dialog_ex, "Format SD card?", 64, 10, AlignCenter, AlignCenter); |         dialog_ex_set_header(dialog_ex, "Format SD card?", 64, 10, AlignCenter, AlignCenter); | ||||||
|  | |||||||
| @ -47,7 +47,8 @@ void storage_settings_scene_formatting_on_enter(void* context) { | |||||||
|         dialog_ex_set_text( |         dialog_ex_set_text( | ||||||
|             dialog_ex, storage_error_get_desc(error), 64, 32, AlignCenter, AlignCenter); |             dialog_ex, storage_error_get_desc(error), 64, 32, AlignCenter, AlignCenter); | ||||||
|     } else { |     } else { | ||||||
|         dialog_ex_set_header(dialog_ex, "Format complete!", 64, 32, AlignCenter, AlignCenter); |         dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51); | ||||||
|  |         dialog_ex_set_header(dialog_ex, "Format\ncomplete!", 14, 15, AlignLeft, AlignTop); | ||||||
|     } |     } | ||||||
|     dialog_ex_set_center_button_text(dialog_ex, "OK"); |     dialog_ex_set_center_button_text(dialog_ex, "OK"); | ||||||
| } | } | ||||||
|  | |||||||
| @ -18,14 +18,10 @@ void storage_settings_scene_sd_info_on_enter(void* context) { | |||||||
|     dialog_ex_set_result_callback(dialog_ex, storage_settings_scene_sd_info_dialog_callback); |     dialog_ex_set_result_callback(dialog_ex, storage_settings_scene_sd_info_dialog_callback); | ||||||
| 
 | 
 | ||||||
|     if(sd_status != FSE_OK) { |     if(sd_status != FSE_OK) { | ||||||
|         dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 10, AlignCenter, AlignCenter); |         dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51); | ||||||
|  |         dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 3, AlignCenter, AlignTop); | ||||||
|         dialog_ex_set_text( |         dialog_ex_set_text( | ||||||
|             dialog_ex, |             dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop); | ||||||
|             "If an SD card is inserted,\r\npull it out and reinsert it", |  | ||||||
|             64, |  | ||||||
|             32, |  | ||||||
|             AlignCenter, |  | ||||||
|             AlignCenter); |  | ||||||
|         dialog_ex_set_center_button_text(dialog_ex, "Ok"); |         dialog_ex_set_center_button_text(dialog_ex, "Ok"); | ||||||
|     } else { |     } else { | ||||||
|         string_printf( |         string_printf( | ||||||
|  | |||||||
| @ -14,15 +14,11 @@ void storage_settings_scene_unmount_confirm_on_enter(void* context) { | |||||||
|     FS_Error sd_status = storage_sd_status(app->fs_api); |     FS_Error sd_status = storage_sd_status(app->fs_api); | ||||||
| 
 | 
 | ||||||
|     if(sd_status == FSE_NOT_READY) { |     if(sd_status == FSE_NOT_READY) { | ||||||
|         dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 10, AlignCenter, AlignCenter); |         dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51); | ||||||
|  |         dialog_ex_set_header(dialog_ex, "SD card not mounted", 64, 3, AlignCenter, AlignTop); | ||||||
|         dialog_ex_set_text( |         dialog_ex_set_text( | ||||||
|             dialog_ex, |             dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop); | ||||||
|             "If an SD card is inserted,\r\npull it out and reinsert it", |         dialog_ex_set_center_button_text(dialog_ex, "Ok"); | ||||||
|             64, |  | ||||||
|             32, |  | ||||||
|             AlignCenter, |  | ||||||
|             AlignCenter); |  | ||||||
|         dialog_ex_set_center_button_text(dialog_ex, "OK"); |  | ||||||
|     } else { |     } else { | ||||||
|         dialog_ex_set_header(dialog_ex, "Unmount SD card?", 64, 10, AlignCenter, AlignCenter); |         dialog_ex_set_header(dialog_ex, "Unmount SD card?", 64, 10, AlignCenter, AlignCenter); | ||||||
|         dialog_ex_set_text( |         dialog_ex_set_text( | ||||||
|  | |||||||
							
								
								
									
										12
									
								
								applications/storage_settings/scenes/storage_settings_scene_unmounted.c
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										12
									
								
								applications/storage_settings/scenes/storage_settings_scene_unmounted.c
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @ -13,17 +13,15 @@ void storage_settings_scene_unmounted_on_enter(void* context) { | |||||||
|     DialogEx* dialog_ex = app->dialog_ex; |     DialogEx* dialog_ex = app->dialog_ex; | ||||||
| 
 | 
 | ||||||
|     dialog_ex_set_center_button_text(dialog_ex, "OK"); |     dialog_ex_set_center_button_text(dialog_ex, "OK"); | ||||||
|  |     dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51); | ||||||
| 
 | 
 | ||||||
|     if(error == FSE_OK) { |     if(error == FSE_OK) { | ||||||
|         dialog_ex_set_header(dialog_ex, "SD card unmounted", 64, 10, AlignCenter, AlignCenter); |         dialog_ex_set_header(dialog_ex, "SD card unmounted", 64, 3, AlignCenter, AlignTop); | ||||||
|         dialog_ex_set_text( |         dialog_ex_set_text(dialog_ex, "You can remove\nSD card now.", 3, 22, AlignLeft, AlignTop); | ||||||
|             dialog_ex, "Now the SD card\ncan be removed.", 64, 32, AlignCenter, AlignCenter); |  | ||||||
|         notification_message(app->notification, &sequence_blink_green_100); |         notification_message(app->notification, &sequence_blink_green_100); | ||||||
|     } else { |     } else { | ||||||
|         dialog_ex_set_header( |         dialog_ex_set_header(dialog_ex, "Cannot unmount SD Card", 64, 3, AlignCenter, AlignTop); | ||||||
|             dialog_ex, "Cannot unmount SD Card", 64, 10, AlignCenter, AlignCenter); |         dialog_ex_set_text(dialog_ex, storage_error_get_desc(error), 3, 22, AlignLeft, AlignTop); | ||||||
|         dialog_ex_set_text( |  | ||||||
|             dialog_ex, storage_error_get_desc(error), 64, 32, AlignCenter, AlignCenter); |  | ||||||
|         notification_message(app->notification, &sequence_blink_red_100); |         notification_message(app->notification, &sequence_blink_red_100); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -26,7 +26,7 @@ bool subghz_scene_set_type_submenu_gen_data_protocol( | |||||||
|         subghz_receiver_search_decoder_base_by_name(subghz->txrx->receiver, protocol_name); |         subghz_receiver_search_decoder_base_by_name(subghz->txrx->receiver, protocol_name); | ||||||
| 
 | 
 | ||||||
|     if(subghz->txrx->decoder_result == NULL) { |     if(subghz->txrx->decoder_result == NULL) { | ||||||
|         string_set_str(subghz->error_str, "Protocol not found"); |         string_set_str(subghz->error_str, "Protocol not\nfound!"); | ||||||
|         scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub); |         scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub); | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -11,8 +11,8 @@ void subghz_scene_show_error_sub_on_enter(void* context) { | |||||||
| 
 | 
 | ||||||
|     // Setup view
 |     // Setup view
 | ||||||
|     Popup* popup = subghz->popup; |     Popup* popup = subghz->popup; | ||||||
|     popup_set_icon(popup, 32, 12, &I_DolphinFirstStart7_61x51); |     popup_set_icon(popup, 72, 14, &I_DolphinFirstStart8_56x51); | ||||||
|     popup_set_header(popup, string_get_cstr(subghz->error_str), 64, 8, AlignCenter, AlignBottom); |     popup_set_header(popup, string_get_cstr(subghz->error_str), 14, 15, AlignLeft, AlignTop); | ||||||
|     popup_set_timeout(popup, 1500); |     popup_set_timeout(popup, 1500); | ||||||
|     popup_set_context(popup, subghz); |     popup_set_context(popup, subghz); | ||||||
|     popup_set_callback(popup, subghz_scene_show_error_sub_popup_callback); |     popup_set_callback(popup, subghz_scene_show_error_sub_popup_callback); | ||||||
|  | |||||||
| @ -94,7 +94,7 @@ bool subghz_scene_transmitter_on_event(void* context, SceneManagerEvent event) { | |||||||
|                 subghz->scene_manager, SubGhzSceneStart); |                 subghz->scene_manager, SubGhzSceneStart); | ||||||
|             return true; |             return true; | ||||||
|         } else if(event.event == SubGhzCustomEventViewTransmitterError) { |         } else if(event.event == SubGhzCustomEventViewTransmitterError) { | ||||||
|             string_set_str(subghz->error_str, "Protocol not found"); |             string_set_str(subghz->error_str, "Protocol not\nfound!"); | ||||||
|             scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub); |             scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub); | ||||||
|         } |         } | ||||||
|     } else if(event.type == SceneManagerEventTypeTick) { |     } else if(event.type == SceneManagerEventTypeTick) { | ||||||
|  | |||||||
| @ -205,15 +205,19 @@ void subghz_tx_stop(SubGhz* subghz) { | |||||||
| void subghz_dialog_message_show_only_rx(SubGhz* subghz) { | void subghz_dialog_message_show_only_rx(SubGhz* subghz) { | ||||||
|     DialogsApp* dialogs = subghz->dialogs; |     DialogsApp* dialogs = subghz->dialogs; | ||||||
|     DialogMessage* message = dialog_message_alloc(); |     DialogMessage* message = dialog_message_alloc(); | ||||||
|  | 
 | ||||||
|  |     dialog_message_set_header(message, "Transmission is blocked", 63, 3, AlignCenter, AlignTop); | ||||||
|  | 
 | ||||||
|     dialog_message_set_text( |     dialog_message_set_text( | ||||||
|         message, |         message, | ||||||
|         "This frequency can\nonly be used for RX\nin your region", |         "This frequency\nis restricted to\nreceiving only\nin your region.", | ||||||
|         38, |         3, | ||||||
|         23, |         17, | ||||||
|         AlignCenter, |         AlignLeft, | ||||||
|         AlignCenter); |         AlignTop); | ||||||
|     dialog_message_set_icon(message, &I_DolphinFirstStart7_61x51, 67, 12); | 
 | ||||||
|     dialog_message_set_buttons(message, "Back", NULL, NULL); |     dialog_message_set_icon(message, &I_DolphinFirstStart8_56x51, 72, 14); | ||||||
|  | 
 | ||||||
|     dialog_message_show(dialogs, message); |     dialog_message_show(dialogs, message); | ||||||
|     dialog_message_free(message); |     dialog_message_free(message); | ||||||
| } | } | ||||||
|  | |||||||
| @ -22,19 +22,21 @@ void u2f_scene_error_on_enter(void* context) { | |||||||
|             AlignTop, |             AlignTop, | ||||||
|             FontSecondary, |             FontSecondary, | ||||||
|             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files."); |             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files."); | ||||||
|     } else if(app->error == U2fAppErrorCloseRpc) { |  | ||||||
|         widget_add_string_multiline_element( |  | ||||||
|             app->widget, |  | ||||||
|             63, |  | ||||||
|             10, |  | ||||||
|             AlignCenter, |  | ||||||
|             AlignTop, |  | ||||||
|             FontSecondary, |  | ||||||
|             "Disconnect from\ncompanion app\nto use this function"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|         widget_add_button_element( |         widget_add_button_element( | ||||||
|             app->widget, GuiButtonTypeLeft, "Back", u2f_scene_error_event_callback, app); |             app->widget, GuiButtonTypeLeft, "Back", u2f_scene_error_event_callback, app); | ||||||
|  |     } else if(app->error == U2fAppErrorCloseRpc) { | ||||||
|  |         widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64); | ||||||
|  |         widget_add_string_multiline_element( | ||||||
|  |             app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "Connection\nis active!"); | ||||||
|  |         widget_add_string_multiline_element( | ||||||
|  |             app->widget, | ||||||
|  |             3, | ||||||
|  |             30, | ||||||
|  |             AlignLeft, | ||||||
|  |             AlignTop, | ||||||
|  |             FontSecondary, | ||||||
|  |             "Disconnect from\nPC or phone to\nuse this function."); | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     view_dispatcher_switch_to_view(app->view_dispatcher, U2fAppViewError); |     view_dispatcher_switch_to_view(app->view_dispatcher, U2fAppViewError); | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										
											BIN
										
									
								
								assets/icons/Common/ActiveConnection_50x64.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/icons/Common/ActiveConnection_50x64.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 3.8 KiB | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikolay Minaylov
						Nikolay Minaylov