diff options
author | gornekich <n.gorbadey@gmail.com> | 2021-10-27 21:55:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 21:55:03 +0300 |
commit | 146cd51894a8695d53d3e84ceb67ec6f964bd172 (patch) | |
tree | d685b14b10a29ecf442fefeddb2748d93a6fc774 /applications/nfc | |
parent | 26c53f3dfdfd290a0949864019bf1735d3fea6a0 (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-x | applications/nfc/scenes/nfc_scene_delete.c | 4 | ||||
-rwxr-xr-x | applications/nfc/scenes/nfc_scene_device_info.c | 4 |
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( |