diff --git a/demos/modules/gwin/widgets/gfxconf.h b/demos/modules/gwin/widgets/gfxconf.h index fd217b0d..5cf344e4 100644 --- a/demos/modules/gwin/widgets/gfxconf.h +++ b/demos/modules/gwin/widgets/gfxconf.h @@ -45,9 +45,9 @@ #define GDISP_NEED_CLIP TRUE #define GDISP_NEED_TEXT TRUE #define GDISP_NEED_CIRCLE TRUE -#define GDISP_NEED_ELLIPSE TRUE -#define GDISP_NEED_ARC TRUE -#define GDISP_NEED_CONVEX_POLYGON TRUE +#define GDISP_NEED_ELLIPSE FALSE +#define GDISP_NEED_ARC FALSE +#define GDISP_NEED_CONVEX_POLYGON FALSE #define GDISP_NEED_SCROLL FALSE #define GDISP_NEED_PIXELREAD FALSE #define GDISP_NEED_CONTROL FALSE @@ -78,6 +78,8 @@ #define GWIN_NEED_BUTTON TRUE #define GWIN_NEED_SLIDER TRUE #define GWIN_NEED_CHECKBOX TRUE +#define GWIN_NEED_LABEL TRUE +#define GWIN_NEED_IMAGE TRUE /* Features for the GINPUT sub-system. */ #define GINPUT_NEED_MOUSE TRUE 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);