diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-02-15 22:29:28 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-02-15 22:29:28 +1000 |
commit | 03914d2d2b438062d3062e2c3a588d53d3040cff (patch) | |
tree | 33e26de0b893c2e59ba087662205d6a34497c5be /demos/modules/gwin/widgets/main.c | |
parent | 9e66363817276214551079baba661d1daa449ff6 (diff) | |
parent | 5edf7c956e8a00a6a49e1f3c446c80cecf0e59ef (diff) | |
download | uGFX-03914d2d2b438062d3062e2c3a588d53d3040cff.tar.gz uGFX-03914d2d2b438062d3062e2c3a588d53d3040cff.tar.bz2 uGFX-03914d2d2b438062d3062e2c3a588d53d3040cff.zip |
Merge branch 'master' into freertos
Diffstat (limited to 'demos/modules/gwin/widgets/main.c')
-rw-r--r-- | demos/modules/gwin/widgets/main.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c index af2926d7..7c06f3bf 100644 --- a/demos/modules/gwin/widgets/main.c +++ b/demos/modules/gwin/widgets/main.c @@ -28,16 +28,19 @@ #include "gfx.h" -// include our chibios logo in a .gif format -#include "image_chibios.h" -#include "image_yesno.h" - /** * This demo demonstrates many of the GWIN widgets. * On the "Radio" tab try playing with the color radio buttons. * On the "Checkbox" tab try playing with the "Disable All" checkbox. */ +/** + * The image files must be stored on a GFILE file-system. + * Use either GFILE_NEED_NATIVEFS or GFILE_NEED_ROMFS (or both). + * + * The ROMFS uses the file "romfs_files.h" to describe the set of files in the ROMFS. + */ + /* Our custom yellow style */ static const GWidgetStyle YellowWidgetStyle = { Yellow, // window background @@ -184,15 +187,14 @@ static void createWidgets(void) { wi.g.x = 0+2*(LIST_WIDTH+1); wi.text = "L3"; ghList3 = gwinListCreate(0, &wi, TRUE); gwinListAddItem(ghList3, "Item 0", FALSE); gwinListAddItem(ghList3, "Item 1", FALSE); gwinListAddItem(ghList3, "Item 2", FALSE); gwinListAddItem(ghList3, "Item 3", FALSE); - gdispImageSetMemoryReader(&imgYesNo, image_yesno); - gdispImageOpen(&imgYesNo); + gdispImageOpenFile(&imgYesNo, "image_yesno.gif"); gwinListItemSetImage(ghList3, 1, &imgYesNo); gwinListItemSetImage(ghList3, 3, &imgYesNo); // Image wi.g.x = ScrWidth-210; wi.g.y = TAB_HEIGHT + 10; wi.g.width = 200; wi.g.height = 200; ghImage1 = gwinImageCreate(0, &wi.g); - gwinImageOpenMemory(ghImage1, image_chibios); + gwinImageOpenFile(ghImage1, "chibios.bmp"); gwinImageCache(ghImage1); // Console - we apply some special colors before making it visible |