[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,20 +27,22 @@ void bad_usb_scene_error_on_enter(void* context) { | ||||
|             AlignTop, | ||||
|             FontSecondary, | ||||
|             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files."); | ||||
|         widget_add_button_element( | ||||
|             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, | ||||
|             63, | ||||
|             10, | ||||
|             AlignCenter, | ||||
|             3, | ||||
|             30, | ||||
|             AlignLeft, | ||||
|             AlignTop, | ||||
|             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", bad_usb_scene_error_event_callback, app); | ||||
| 
 | ||||
|     view_dispatcher_switch_to_view(app->view_dispatcher, BadUsbAppViewError); | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -1,32 +1,20 @@ | ||||
| #include "../gpio_app_i.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) { | ||||
|     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( | ||||
|         app->widget, | ||||
|         63, | ||||
|         10, | ||||
|         AlignCenter, | ||||
|         3, | ||||
|         30, | ||||
|         AlignLeft, | ||||
|         AlignTop, | ||||
|         FontSecondary, | ||||
|         "Disconnect from\ncompanion app\nto use this function"); | ||||
| 
 | ||||
|     widget_add_button_element( | ||||
|         app->widget, GuiButtonTypeLeft, "Back", gpio_scene_usb_uart_close_rpc_event_callback, app); | ||||
|         "Disconnect from\nPC or phone to\nuse this function."); | ||||
| 
 | ||||
|     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: | ||||
|             if(!card_not_supported) { | ||||
|                 auto popup = app->view_controller.get<PopupVM>(); | ||||
|                 popup->set_icon(0, 0, NULL); | ||||
|                 popup->set_header("Still trying to write", 64, 7, AlignCenter, AlignTop); | ||||
|                 popup->set_icon(72, 14, &I_DolphinFirstStart8_56x51); | ||||
|                 popup->set_header("Still trying to write...", 64, 3, AlignCenter, AlignTop); | ||||
|                 popup->set_text( | ||||
|                     "This card may be protected\nor does not support this\ntype of writing", | ||||
|                     64, | ||||
|                     23, | ||||
|                     AlignCenter, | ||||
|                     "Make sure this\ncard is writable\nand not\nprotected.", | ||||
|                     3, | ||||
|                     17, | ||||
|                     AlignLeft, | ||||
|                     AlignTop); | ||||
|                 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); | ||||
| 
 | ||||
|     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, | ||||
|             "If an SD card is inserted,\r\npull it out and reinsert it", | ||||
|             64, | ||||
|             32, | ||||
|             AlignCenter, | ||||
|             AlignCenter); | ||||
|             dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop); | ||||
|         dialog_ex_set_center_button_text(dialog_ex, "Ok"); | ||||
|     } else { | ||||
|         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); | ||||
| 
 | ||||
|     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, | ||||
|             "If an SD card is inserted,\r\npull it out and reinsert it", | ||||
|             64, | ||||
|             32, | ||||
|             AlignCenter, | ||||
|             AlignCenter); | ||||
|             dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop); | ||||
|         dialog_ex_set_center_button_text(dialog_ex, "Ok"); | ||||
|     } else { | ||||
|         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, storage_error_get_desc(error), 64, 32, AlignCenter, AlignCenter); | ||||
|     } 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"); | ||||
| } | ||||
|  | ||||
| @ -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); | ||||
| 
 | ||||
|     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, | ||||
|             "If an SD card is inserted,\r\npull it out and reinsert it", | ||||
|             64, | ||||
|             32, | ||||
|             AlignCenter, | ||||
|             AlignCenter); | ||||
|             dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop); | ||||
|         dialog_ex_set_center_button_text(dialog_ex, "Ok"); | ||||
|     } else { | ||||
|         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); | ||||
| 
 | ||||
|     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, | ||||
|             "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, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop); | ||||
|         dialog_ex_set_center_button_text(dialog_ex, "Ok"); | ||||
|     } else { | ||||
|         dialog_ex_set_header(dialog_ex, "Unmount SD card?", 64, 10, AlignCenter, AlignCenter); | ||||
|         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; | ||||
| 
 | ||||
|     dialog_ex_set_center_button_text(dialog_ex, "OK"); | ||||
|     dialog_ex_set_icon(dialog_ex, 72, 14, &I_DolphinFirstStart8_56x51); | ||||
| 
 | ||||
|     if(error == FSE_OK) { | ||||
|         dialog_ex_set_header(dialog_ex, "SD card unmounted", 64, 10, AlignCenter, AlignCenter); | ||||
|         dialog_ex_set_text( | ||||
|             dialog_ex, "Now the SD card\ncan be removed.", 64, 32, AlignCenter, AlignCenter); | ||||
|         dialog_ex_set_header(dialog_ex, "SD card unmounted", 64, 3, AlignCenter, AlignTop); | ||||
|         dialog_ex_set_text(dialog_ex, "You can remove\nSD card now.", 3, 22, AlignLeft, AlignTop); | ||||
|         notification_message(app->notification, &sequence_blink_green_100); | ||||
|     } else { | ||||
|         dialog_ex_set_header( | ||||
|             dialog_ex, "Cannot unmount SD Card", 64, 10, AlignCenter, AlignCenter); | ||||
|         dialog_ex_set_text( | ||||
|             dialog_ex, storage_error_get_desc(error), 64, 32, AlignCenter, AlignCenter); | ||||
|         dialog_ex_set_header(dialog_ex, "Cannot unmount SD Card", 64, 3, AlignCenter, AlignTop); | ||||
|         dialog_ex_set_text(dialog_ex, storage_error_get_desc(error), 3, 22, AlignLeft, AlignTop); | ||||
|         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); | ||||
| 
 | ||||
|     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); | ||||
|         return false; | ||||
|     } | ||||
|  | ||||
| @ -11,8 +11,8 @@ void subghz_scene_show_error_sub_on_enter(void* context) { | ||||
| 
 | ||||
|     // Setup view
 | ||||
|     Popup* popup = subghz->popup; | ||||
|     popup_set_icon(popup, 32, 12, &I_DolphinFirstStart7_61x51); | ||||
|     popup_set_header(popup, string_get_cstr(subghz->error_str), 64, 8, AlignCenter, AlignBottom); | ||||
|     popup_set_icon(popup, 72, 14, &I_DolphinFirstStart8_56x51); | ||||
|     popup_set_header(popup, string_get_cstr(subghz->error_str), 14, 15, AlignLeft, AlignTop); | ||||
|     popup_set_timeout(popup, 1500); | ||||
|     popup_set_context(popup, subghz); | ||||
|     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); | ||||
|             return true; | ||||
|         } 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); | ||||
|         } | ||||
|     } else if(event.type == SceneManagerEventTypeTick) { | ||||
|  | ||||
| @ -205,15 +205,19 @@ void subghz_tx_stop(SubGhz* subghz) { | ||||
| void subghz_dialog_message_show_only_rx(SubGhz* subghz) { | ||||
|     DialogsApp* dialogs = subghz->dialogs; | ||||
|     DialogMessage* message = dialog_message_alloc(); | ||||
| 
 | ||||
|     dialog_message_set_header(message, "Transmission is blocked", 63, 3, AlignCenter, AlignTop); | ||||
| 
 | ||||
|     dialog_message_set_text( | ||||
|         message, | ||||
|         "This frequency can\nonly be used for RX\nin your region", | ||||
|         38, | ||||
|         23, | ||||
|         AlignCenter, | ||||
|         AlignCenter); | ||||
|     dialog_message_set_icon(message, &I_DolphinFirstStart7_61x51, 67, 12); | ||||
|     dialog_message_set_buttons(message, "Back", NULL, NULL); | ||||
|         "This frequency\nis restricted to\nreceiving only\nin your region.", | ||||
|         3, | ||||
|         17, | ||||
|         AlignLeft, | ||||
|         AlignTop); | ||||
| 
 | ||||
|     dialog_message_set_icon(message, &I_DolphinFirstStart8_56x51, 72, 14); | ||||
| 
 | ||||
|     dialog_message_show(dialogs, message); | ||||
|     dialog_message_free(message); | ||||
| } | ||||
|  | ||||
| @ -22,20 +22,22 @@ void u2f_scene_error_on_enter(void* context) { | ||||
|             AlignTop, | ||||
|             FontSecondary, | ||||
|             "No SD card or\napp data found.\nThis app will not\nwork without\nrequired files."); | ||||
|         widget_add_button_element( | ||||
|             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, | ||||
|             63, | ||||
|             10, | ||||
|             AlignCenter, | ||||
|             3, | ||||
|             30, | ||||
|             AlignLeft, | ||||
|             AlignTop, | ||||
|             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", u2f_scene_error_event_callback, app); | ||||
| 
 | ||||
|     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