diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-07-04 00:22:15 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-07-04 00:22:15 +1000 |
commit | dce9dc00a8bc9aa400b1354c442044586b82bfbc (patch) | |
tree | ab62711b64e92068edabf9668b27f2f0b608e6cd /demos/modules/gwin/widgets/main.c | |
parent | 09a359813f0abe8f99c32dadfa1ac2c68356ddfd (diff) | |
download | uGFX-dce9dc00a8bc9aa400b1354c442044586b82bfbc.tar.gz uGFX-dce9dc00a8bc9aa400b1354c442044586b82bfbc.tar.bz2 uGFX-dce9dc00a8bc9aa400b1354c442044586b82bfbc.zip |
Widget demo update
Diffstat (limited to 'demos/modules/gwin/widgets/main.c')
-rw-r--r-- | demos/modules/gwin/widgets/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c index 70f64572..fdd5ed43 100644 --- a/demos/modules/gwin/widgets/main.c +++ b/demos/modules/gwin/widgets/main.c @@ -33,6 +33,7 @@ static GHandle ghConsole; static GHandle ghButton1, ghButton2, ghButton3, ghButton4; static GHandle ghSlider1, ghSlider2, ghSlider3, ghSlider4; static GHandle ghCheckbox1, ghCheckbox2; +static GHandle ghLabel1; #define ScrWidth gdispGetWidth() #define ScrHeight gdispGetHeight() @@ -95,6 +96,9 @@ int main(void) { gwinSetCustomDraw(ghCheckbox2, gwinCheckboxDraw_CheckOnRight, 0); gwinSetVisible(ghCheckbox2, TRUE); + wi.g.show = TRUE; wi.g.width = 0; + wi.g.y = BUTTON_HEIGHT+1+2*(CHECKBOX_HEIGHT+1); wi.text = "L1"; ghLabel1 = gwinLabelCreate(NULL, &wi); + // Console - we apply some special colors before making it visible wi.g.show = FALSE; wi.g.width = ScrWidth/2-1; wi.g.height = ScrHeight/2-1; @@ -116,6 +120,16 @@ int main(void) { gwinAttachDial(ghSlider3, 0, 1); #endif + gfxSleepMilliseconds(5000); + gwinSetBgColor(ghLabel1, Blue); + gwinSetColor(ghLabel1, Yellow); + gwinSetText(ghLabel1, "Very Big Label", FALSE); + + gfxSleepMilliseconds(5000); + gwinSetBgColor(ghLabel1, Yellow); + gwinSetColor(ghLabel1, Red); + gwinSetText(ghLabel1, "L1", FALSE); + while(1) { // Get an Event pe = geventEventWait(&gl, TIME_INFINITE); |