diff options
author | Joel Bodenmann <joel@unormal.org> | 2013-12-01 23:53:42 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2013-12-01 23:53:42 +0100 |
commit | 560f946cd9896b5126c2066058c63d8cbc3d0539 (patch) | |
tree | c1cd1613c7c69471f35c9648b68bfab48b749d32 /demos/modules/gwin/progressbar/main.c | |
parent | 3c3b6967d15fee5414c45408a28475a8bf39c293 (diff) | |
download | uGFX-560f946cd9896b5126c2066058c63d8cbc3d0539.tar.gz uGFX-560f946cd9896b5126c2066058c63d8cbc3d0539.tar.bz2 uGFX-560f946cd9896b5126c2066058c63d8cbc3d0539.zip |
Added progressbar widget (demos still to do)
Diffstat (limited to 'demos/modules/gwin/progressbar/main.c')
-rw-r--r-- | demos/modules/gwin/progressbar/main.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/demos/modules/gwin/progressbar/main.c b/demos/modules/gwin/progressbar/main.c new file mode 100644 index 00000000..6217f4c1 --- /dev/null +++ b/demos/modules/gwin/progressbar/main.c @@ -0,0 +1,39 @@ +#include "gfx.h" + +GHandle ghProgressbar; + +static void _createWidget(void) { + GWidgetInit wi; + + wi.customDraw = 0; + wi.customParam = 0; + wi.customStyle = 0; + wi.g.show = TRUE; + + wi.g.y = 10; wi.g.x = 10; wi.g.width = 200; wi.g.height = 20; wi.text = "Progress 1"; + ghProgressbar = gwinProgressbarCreate(NULL, &wi); +} + +int main(void) { + gfxInit(); + + gwinSetDefaultFont(gdispOpenFont("UI2")); + gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE); + gdispClear(White); + + _createWidget(); + + gwinProgressbarSetResolution(ghProgressbar, 10); + gwinProgressbarStart(ghProgressbar, 500); + + //gwinProgressbarSetPosition(ghProgressbar, 42); + //gwinProgressbarIncrement(ghProgressbar); + //gwinProgressbarDecrement(ghProgressbar); + + while (1) { + gfxSleepMilliseconds(500); + } + + return 0; +} + |