[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:
Nikolay Minaylov
2022-07-25 15:11:34 +03:00
committed by GitHub
parent 3ee592cae7
commit f5d6a8084b
15 changed files with 66 additions and 87 deletions

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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);
}