This commit is contained in:
Willy-JL
2024-05-23 01:10:07 +01:00
5 changed files with 48 additions and 17 deletions

View File

@@ -18,6 +18,33 @@ static const TextBoxViewTestContent text_box_view_test_content_arr[] = {
.focus = TextBoxFocusStart,
.text = "Hello, let's test text box. Press Right and Left to switch content",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text = "First test to add dynamically lines with EndFocus set\nLine 0",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text = "First test to add dynamically lines with EndFocus set\nLine 0\nLine 1",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text = "First test to add dynamically lines with EndFocus set\nLine 0\nLine 1\nLine 2",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text =
"First test to add dynamically lines with EndFocus set\nLine 0\nLine 1\nLine 2\nLine 3",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text =
"First test to add dynamically lines with EndFocus set\nLine 0\nLine 1\nLine 2\nLine 3\nLine 4",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusStart,
@@ -57,7 +84,8 @@ typedef struct {
} TextBoxViewTest;
static void text_box_update_view(TextBoxViewTest* instance) {
text_box_reset(instance->text_box);
// Intentional incorrect way to reset text box to verify that state resets if text changes
text_box_set_text(instance->text_box, "");
const TextBoxViewTestContent* content =
&text_box_view_test_content_arr[instance->current_content_i];