aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin/widgets/main.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-02-15 22:31:33 +1000
committerinmarket <andrewh@inmarket.com.au>2014-02-15 22:31:33 +1000
commitdcedf414136e55e6dacbe736babe748e1374e19e (patch)
treede3823534bfa37f9cc92c0dae3b474db8ece9088 /demos/modules/gwin/widgets/main.c
parent84fc1ac166fc2908b5840a78ceb515b4f14edd80 (diff)
parent5edf7c956e8a00a6a49e1f3c446c80cecf0e59ef (diff)
downloaduGFX-dcedf414136e55e6dacbe736babe748e1374e19e.tar.gz
uGFX-dcedf414136e55e6dacbe736babe748e1374e19e.tar.bz2
uGFX-dcedf414136e55e6dacbe736babe748e1374e19e.zip
Merge branch 'master' into gwin
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