Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgornekich <n.gorbadey@gmail.com>2021-10-27 21:55:03 +0300
committerGitHub <noreply@github.com>2021-10-27 21:55:03 +0300
commit146cd51894a8695d53d3e84ceb67ec6f964bd172 (patch)
treed685b14b10a29ecf442fefeddb2748d93a6fc774 /applications/nfc
parent26c53f3dfdfd290a0949864019bf1735d3fea6a0 (diff)
[FL-1497] GUI textbox element and widget (#792)
* canvas: add font parameters * elements: add text box element * widget: add text box element * nfc: rework delete and info scene with text box widget * gui: update documentation * gui: fix canvas_get_font_params return Co-authored-by: あく <alleteam@gmail.com>
Diffstat (limited to 'applications/nfc')
-rwxr-xr-xapplications/nfc/scenes/nfc_scene_delete.c4
-rwxr-xr-xapplications/nfc/scenes/nfc_scene_device_info.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/applications/nfc/scenes/nfc_scene_delete.c b/applications/nfc/scenes/nfc_scene_delete.c
index 993e1e37..0ea1b214 100755
--- a/applications/nfc/scenes/nfc_scene_delete.c
+++ b/applications/nfc/scenes/nfc_scene_delete.c
@@ -12,8 +12,8 @@ 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);
- widget_add_string_element(nfc->widget, 64, 6, AlignCenter, AlignTop, FontPrimary, delete_str);
+ snprintf(delete_str, sizeof(delete_str), "\e#Delete %s\e#", nfc->dev.dev_name);
+ widget_add_text_box_element(nfc->widget, 0, 0, 128, 24, AlignCenter, AlignCenter, delete_str);
widget_add_button_element(
nfc->widget, GuiButtonTypeLeft, "Back", nfc_scene_delete_widget_callback, nfc);
widget_add_button_element(
diff --git a/applications/nfc/scenes/nfc_scene_device_info.c b/applications/nfc/scenes/nfc_scene_device_info.c
index 674b3f6d..54196a32 100755
--- a/applications/nfc/scenes/nfc_scene_device_info.c
+++ b/applications/nfc/scenes/nfc_scene_device_info.c
@@ -35,8 +35,8 @@ void nfc_scene_device_info_on_enter(void* context) {
Nfc* nfc = context;
// Setup Custom Widget view
- widget_add_string_element(
- nfc->widget, 64, 6, AlignCenter, AlignTop, FontSecondary, nfc->dev.dev_name);
+ widget_add_text_box_element(
+ nfc->widget, 0, 0, 128, 24, AlignCenter, AlignCenter, nfc->dev.dev_name);
widget_add_button_element(
nfc->widget, GuiButtonTypeLeft, "Back", nfc_scene_device_info_widget_callback, nfc);
widget_add_button_element(