From 03f9ce815cbba660bb4c8e7cd28cfc19219631c8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 2 May 2025 08:46:42 -0600 Subject: expo: Support rendering multiple lines of text Use the measurement info to write each line of text separately, thus respecting word-wrapping and newlines. Fix up the comment for scene_obj_render() while we are here. Since a lineedit does not support alignment, add a special case to just display the text if there is no measurement. This happens assuming the lineedit is initially empty. Signed-off-by: Simon Glass --- include/expo.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/expo.h b/include/expo.h index 7c6ab4bf630..a79aa1da74f 100644 --- a/include/expo.h +++ b/include/expo.h @@ -8,6 +8,7 @@ #define __EXPO_H #include +#include #include #include #include @@ -296,11 +297,14 @@ struct scene_obj_img { * @str_id: ID of the text string to display * @font_name: Name of font (allocated by caller) * @font_size: Nominal size of font in pixels + * @lines: alist of struct vidconsole_mline with a separate record for each + * line of text */ struct scene_txt_generic { uint str_id; const char *font_name; uint font_size; + struct alist lines; }; /** -- cgit v1.2.3