|
|
@@ -12,11 +12,10 @@ void nfc_scene_delete_on_enter(void* context) {
|
|
|
// Setup Custom Widget view
|
|
|
char delete_str[64];
|
|
|
snprintf(delete_str, sizeof(delete_str), "Delete %s", nfc->dev.dev_name);
|
|
|
- gui_widget_add_string_element(
|
|
|
- nfc->widget, 64, 6, AlignCenter, AlignTop, FontPrimary, delete_str);
|
|
|
- gui_widget_add_button_element(
|
|
|
+ widget_add_string_element(nfc->widget, 64, 6, AlignCenter, AlignTop, FontPrimary, delete_str);
|
|
|
+ widget_add_button_element(
|
|
|
nfc->widget, GuiButtonTypeLeft, "Back", nfc_scene_delete_widget_callback, nfc);
|
|
|
- gui_widget_add_button_element(
|
|
|
+ widget_add_button_element(
|
|
|
nfc->widget, GuiButtonTypeRight, "Delete", nfc_scene_delete_widget_callback, nfc);
|
|
|
char uid_str[32];
|
|
|
NfcDeviceCommomData* data = &nfc->dev.dev_data.nfc_data;
|
|
|
@@ -42,11 +41,10 @@ void nfc_scene_delete_on_enter(void* context) {
|
|
|
data->uid[5],
|
|
|
data->uid[6]);
|
|
|
}
|
|
|
- gui_widget_add_string_element(
|
|
|
- nfc->widget, 64, 21, AlignCenter, AlignTop, FontSecondary, uid_str);
|
|
|
+ widget_add_string_element(nfc->widget, 64, 21, AlignCenter, AlignTop, FontSecondary, uid_str);
|
|
|
|
|
|
if(data->protocol > NfcDeviceProtocolUnknown) {
|
|
|
- gui_widget_add_string_element(
|
|
|
+ widget_add_string_element(
|
|
|
nfc->widget,
|
|
|
10,
|
|
|
32,
|
|
|
@@ -56,16 +54,13 @@ void nfc_scene_delete_on_enter(void* context) {
|
|
|
nfc_get_protocol(data->protocol));
|
|
|
}
|
|
|
// TODO change dinamically
|
|
|
- gui_widget_add_string_element(
|
|
|
- nfc->widget, 118, 32, AlignRight, AlignTop, FontSecondary, "NFC-A");
|
|
|
+ widget_add_string_element(nfc->widget, 118, 32, AlignRight, AlignTop, FontSecondary, "NFC-A");
|
|
|
char sak_str[16];
|
|
|
snprintf(sak_str, sizeof(sak_str), "SAK: %02X", data->sak);
|
|
|
- gui_widget_add_string_element(
|
|
|
- nfc->widget, 10, 42, AlignLeft, AlignTop, FontSecondary, sak_str);
|
|
|
+ widget_add_string_element(nfc->widget, 10, 42, AlignLeft, AlignTop, FontSecondary, sak_str);
|
|
|
char atqa_str[16];
|
|
|
snprintf(atqa_str, sizeof(atqa_str), "ATQA: %02X%02X", data->atqa[0], data->atqa[1]);
|
|
|
- gui_widget_add_string_element(
|
|
|
- nfc->widget, 118, 42, AlignRight, AlignTop, FontSecondary, atqa_str);
|
|
|
+ widget_add_string_element(nfc->widget, 118, 42, AlignRight, AlignTop, FontSecondary, atqa_str);
|
|
|
|
|
|
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget);
|
|
|
}
|
|
|
@@ -91,5 +86,5 @@ const bool nfc_scene_delete_on_event(void* context, SceneManagerEvent event) {
|
|
|
const void nfc_scene_delete_on_exit(void* context) {
|
|
|
Nfc* nfc = (Nfc*)context;
|
|
|
|
|
|
- gui_widget_clear(nfc->widget);
|
|
|
+ widget_clear(nfc->widget);
|
|
|
}
|