diff options
Diffstat (limited to 'textscreen/examples')
-rw-r--r-- | textscreen/examples/guitest.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/textscreen/examples/guitest.c b/textscreen/examples/guitest.c index 893974df..792e38cc 100644 --- a/textscreen/examples/guitest.c +++ b/textscreen/examples/guitest.c @@ -82,6 +82,7 @@ void SetupWindow(void) TXT_AddWidget(window, toplabel); TXT_SetWidgetAlign(toplabel, TXT_HORIZ_CENTER); + //TXT_AddWidget(window, TXT_NewScrollPane(15, 4, table)); TXT_AddWidget(window, table); for (i=0; i<5; ++i) @@ -174,6 +175,35 @@ void Window2(void) TXT_AddWidget(window, scrollpane); } +void ScrollingMenu(void) +{ + txt_window_t *window; + txt_button_t *button; + txt_table_t *table; + + window = TXT_NewWindow("Scrollable menu"); + + table = TXT_NewTable(1); + + TXT_AddWidgets(table, + TXT_NewButton("Configure display"), + TXT_NewButton("Configure joystick"), + TXT_NewButton("Configure keyboard"), + TXT_NewButton("Configure mouse"), + TXT_NewButton("Configure sound"), + TXT_NewStrut(0, 1), + button = TXT_NewButton("Save Parameters and launch DOOM"), + TXT_NewStrut(0, 1), + TXT_NewButton("Start a network game"), + TXT_NewButton("Join a network game"), + TXT_NewButton("Multiplayer configuration"), + NULL); + + TXT_SignalConnect(button, "pressed", PwnBox, NULL); + + TXT_AddWidget(window, TXT_NewScrollPane(0, 6, table)); +} + int main(int argc, char *argv[]) { if (!TXT_Init()) @@ -184,6 +214,7 @@ int main(int argc, char *argv[]) TXT_SetDesktopTitle("Not Chocolate Doom Setup"); + ScrollingMenu(); Window2(); SetupWindow(); |