imtk
diff test.c @ 10:467a520f5c00
implemented the listbox correctly, no scrollbars or explicit sizing yet
author | John Tsiombikas <nuclear@siggraph.org> |
---|---|
date | Sun, 17 Apr 2011 18:17:55 +0300 |
parents | 6d35e6c7b2ca |
children | 9c7987064bb0 |
line diff
1.1 --- a/test.c Sat Apr 16 22:59:23 2011 +0300 1.2 +++ b/test.c Sun Apr 17 18:17:55 2011 +0300 1.3 @@ -108,8 +108,8 @@ 1.4 static char textbuf[256]; 1.5 static char textbuf2[256]; 1.6 static float val; 1.7 - /*static int prev_sel; 1.8 - char *itemlist;*/ 1.9 + static int prev_sel = 0; 1.10 + char *itemlist; 1.11 1.12 imtk_begin(); 1.13 1.14 @@ -132,12 +132,12 @@ 1.15 glutPostRedisplay(); 1.16 } 1.17 1.18 - /*itemlist = imtk_create_list("teapot", "torus", "sphere", NULL); 1.19 + itemlist = imtk_create_list("teapot", "torus", "sphere", NULL); 1.20 if((objsel = imtk_listbox(IMUID, itemlist, prev_sel, 30, 120)) != prev_sel) { 1.21 prev_sel = objsel; 1.22 glutPostRedisplay(); 1.23 } 1.24 - imtk_free_list(itemlist);*/ 1.25 + imtk_free_list(itemlist); 1.26 1.27 imtk_textbox(IMUID, textbuf, sizeof textbuf, 30, 200); 1.28 imtk_textbox(IMUID, textbuf2, sizeof textbuf2, 30, 250);