aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin/widgets/main.c
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-02-09 02:19:38 +0100
committerJoel Bodenmann <joel@unormal.org>2014-02-09 02:19:38 +0100
commitf68f4fcd21831894a1330131d7feefa0e63c39c1 (patch)
tree53f68c28ca4bc52a9ef0d393b362a488ca8e0ddf /demos/modules/gwin/widgets/main.c
parent3c6df9a4a1b810411d9207fd2da39c3378bb9657 (diff)
parentc5f87f9952b11f0792dd1455e3f4286123c1d388 (diff)
downloaduGFX-f68f4fcd21831894a1330131d7feefa0e63c39c1.tar.gz
uGFX-f68f4fcd21831894a1330131d7feefa0e63c39c1.tar.bz2
uGFX-f68f4fcd21831894a1330131d7feefa0e63c39c1.zip
Merge branch 'gfile'
Diffstat (limited to 'demos/modules/gwin/widgets/main.c')
-rw-r--r--demos/modules/gwin/widgets/main.c16
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