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.
This commit is contained in:
Simon Howard 2017-01-21 16:37:51 +00:00
parent fcf16607c7
commit 148e9e53aa

View file

@ -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));