[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>
This commit is contained in:
gornekich
2021-10-27 21:55:03 +03:00
committed by GitHub
parent 26c53f3dfd
commit 146cd51894
10 changed files with 470 additions and 40 deletions

View File

@@ -75,6 +75,30 @@ void widget_add_string_element(
Font font,
const char* text);
/** Add Text Box Element
*
* @param widget Widget instance
* @param x x coordinate
* @param y y coordinate
* @param width width to fit text
* @param height height to fit text
* @param horizontal Align instance
* @param vertical Align instance
* @param[in] text Formatted text. The following formats are available:
* "\e#Bold text\e#" - bold font is used
* "\e*Monospaced text\e*" - monospaced font is used
* "\e#Inversed text\e#" - white text on black background
*/
void widget_add_text_box_element(
Widget* widget,
uint8_t x,
uint8_t y,
uint8_t width,
uint8_t height,
Align horizontal,
Align vertical,
const char* text);
/** Add Button Element
*
* @param widget Widget instance