diff options
Diffstat (limited to 'demos/modules/gwin/list')
-rw-r--r-- | demos/modules/gwin/list/gfxconf.h | 2 | ||||
-rw-r--r-- | demos/modules/gwin/list/main.c | 31 |
2 files changed, 21 insertions, 12 deletions
diff --git a/demos/modules/gwin/list/gfxconf.h b/demos/modules/gwin/list/gfxconf.h index 895d7c49..cf5f8690 100644 --- a/demos/modules/gwin/list/gfxconf.h +++ b/demos/modules/gwin/list/gfxconf.h @@ -40,7 +40,7 @@ #define GDISP_NEED_CIRCLE TRUE #define GDISP_NEED_ELLIPSE TRUE #define GDISP_NEED_ARC FALSE -#define GDISP_NEED_CONVEX_POLYGON FALSE +#define GDISP_NEED_CONVEX_POLYGON TRUE #define GDISP_NEED_SCROLL FALSE #define GDISP_NEED_PIXELREAD FALSE #define GDISP_NEED_CONTROL FALSE diff --git a/demos/modules/gwin/list/main.c b/demos/modules/gwin/list/main.c index 35847be0..a3a17250 100644 --- a/demos/modules/gwin/list/main.c +++ b/demos/modules/gwin/list/main.c @@ -10,11 +10,11 @@ static void createWidgets(void) { wi.customDraw = 0; wi.customParam = 0; wi.customStyle = 0; - wi.g.show = TRUE; + wi.g.show = FALSE; // Apply the list parameters - wi.g.width = 300; - wi.g.height = 200; + wi.g.width = 100; + wi.g.height = 80; wi.g.y = 10; wi.g.x = 10; wi.text = "List Name"; @@ -32,7 +32,7 @@ int main(void) { // Set the widget defaults gwinSetDefaultFont(gdispOpenFont("UI2")); gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE); - gdispClear(White); + gdispClear(Red); // Attach the mouse input gwinAttachMouse(0); @@ -45,13 +45,22 @@ int main(void) { gwinAttachListener(&gl); // Add some items to the list widget - gwinListAddItem(ghList1, "Item 0", TRUE); - gwinListAddItem(ghList1, "Item 1", TRUE); - gwinListAddItem(ghList1, "Item 2", TRUE); - gwinListAddItem(ghList1, "Item 3", TRUE); - gwinListAddItem(ghList1, "Item 4", TRUE); - - gwinRedraw(ghList1); + gwinListAddItem(ghList1, "Item 0", FALSE); + gwinListAddItem(ghList1, "Item 1", FALSE); + gwinListAddItem(ghList1, "Item 2", FALSE); + gwinListAddItem(ghList1, "Item 3", FALSE); + gwinListAddItem(ghList1, "Item 4", FALSE); + gwinListAddItem(ghList1, "Item 5", FALSE); + gwinListAddItem(ghList1, "Item 6", FALSE); + gwinListAddItem(ghList1, "Item 7", FALSE); + gwinListAddItem(ghList1, "Item 8", FALSE); + gwinListAddItem(ghList1, "Item 9", FALSE); + gwinListAddItem(ghList1, "Item 10", FALSE); + gwinListAddItem(ghList1, "Item 11", FALSE); + gwinListAddItem(ghList1, "Item 12", FALSE); + gwinListAddItem(ghList1, "Item 13", FALSE); + + gwinSetVisible(ghList1, TRUE); while(1) { // Get an Event |