From dce9dc00a8bc9aa400b1354c442044586b82bfbc Mon Sep 17 00:00:00 2001 From: inmarket Date: Thu, 4 Jul 2013 00:22:15 +1000 Subject: Widget demo update --- demos/modules/gwin/widgets/main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'demos/modules/gwin/widgets/main.c') 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); -- cgit v1.2.3