diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/main.c b/tests/main.c index eb1c24f..e1aa6f1 100644 --- a/tests/main.c +++ b/tests/main.c @@ -3,6 +3,7 @@ #include "../include/mgui/scrollview.h" #include "../include/mgui/button.h" #include "../include/mgui/label.h" +#include "../include/mgui/richtext.h" #include <mgl/mgl.h> #include <mgl/window/window.h> #include <mgl/window/event.h> @@ -16,8 +17,8 @@ static mgui_list* create_list_item(const char *title, const char *description) { mgui_list *list = mgui_list_create(MGUI_LIST_VERTICAL); mgui_list_append(container, mgui_list_to_widget(list)); - mgui_list_append(list, mgui_label_to_widget(mgui_label_create(title, strlen(title), 30))); - mgui_list_append(list, mgui_label_to_widget(mgui_label_create(description, strlen(description), 24))); + mgui_list_append(list, mgui_richtext_to_widget(mgui_richtext_create(title, strlen(title), 30))); + mgui_list_append(list, mgui_richtext_to_widget(mgui_richtext_create(description, strlen(description), 24))); return container; } @@ -36,7 +37,7 @@ int main() { mgui_scrollview_set_child(scrollview, mgui_list_to_widget(list)); for(int i = 0; i < 30; ++i) { char text[256]; - snprintf(text, sizeof(text), "hello world %d", i); + snprintf(text, sizeof(text), "hello world 東京 %d", i); mgui_list_append(list, mgui_list_to_widget(create_list_item("User", text))); } |