commit 148e9e53aab6e3db92eae3cf84f979ef5f8b6da9
Author: Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sat Jan 21 16:37:51 2017 +0000
Commit: Simon Howard <fraggle@soulsphere.org>
CommitDate: Sat Jan 21 16:37:51 2017 +0000
textscreen: Add Italian window.
Add a window containing one of each type of widget that uses string
labels, and include something in Italian that uses at least one Unicode
character, for testing the UTF8 change.
---
textscreen/examples/guitest.c | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/textscreen/examples/guitest.c b/textscreen/examples/guitest.c
index 2d0060d1..5c736055 100644
--- a/textscreen/examples/guitest.c
+++ b/textscreen/examples/guitest.c
@@ -83,6 +83,32 @@ void CloseWindow(TXT_UNCAST_ARG(button), void *user_data)
TXT_CloseWindow(firstwin);
}
+void UnicodeWindow(TXT_UNCAST_ARG(widget), void *user_data)
+{
+ static char *strings[] = {
+ "lunedì", "martedì", "mercoledì", "giovedì",
+ "venerdì", "sabato", "domenica",
+ };
+ static int var1, var2;
+ txt_window_t *window;
+
+ window = TXT_NewWindow("Questo è in Italiano");
+
+ TXT_AddWidgets(window,
+ TXT_NewButton("Questo è un tasto"),
+ TXT_NewCheckBox("Questo è un checkbox", &var1),
+ TXT_NewDropdownList(&var2, strings, 7),
+ TXT_NewSeparator("Questo è un separatore"),
+ TXT_NewLabel("Leggi questo, è pieno di\n"
+ "informazioni interessanti"),
+ TXT_NewRadioButton("Ma questo non è un radio??",
+ &var1, 0),
+ NULL);
+ TXT_SetWindowAction(window, TXT_HORIZ_RIGHT,
+ TXT_NewWindowAction(KEY_ENTER, "Nullità"));
+
+}
+
void SetupWindow(void)
{
txt_window_t *window;
@@ -93,7 +119,7 @@ void SetupWindow(void)
txt_label_t *toplabel;
char buf[100];
int i;
-
+
window = TXT_NewWindow("Window test");
TXT_SetWindowHelpURL(window, "https://www.youtube.com/watch?v=dQw4w9WgXcQ");
@@ -128,7 +154,7 @@ void SetupWindow(void)
TXT_NewButton("Do nothing"),
TXT_TABLE_OVERFLOW_DOWN,
TXT_TABLE_OVERFLOW_DOWN,
- TXT_NewButton("Also nothing"),
+ TXT_NewButton2("Qualcosa?", UnicodeWindow, NULL),
NULL);
TXT_AddWidget(window, TXT_NewStrut(0, 1));