Update the frame demo to reveal a surprise when the frame is closed.
This commit is contained in:
parent
8e503470fe
commit
65c8b96a3d
2 changed files with 9 additions and 0 deletions
|
@ -46,6 +46,7 @@
|
||||||
#define GWIN_NEED_WINDOWMANAGER TRUE
|
#define GWIN_NEED_WINDOWMANAGER TRUE
|
||||||
|
|
||||||
#define GWIN_NEED_WIDGET TRUE
|
#define GWIN_NEED_WIDGET TRUE
|
||||||
|
#define GWIN_NEED_LABEL TRUE
|
||||||
#define GWIN_NEED_BUTTON TRUE
|
#define GWIN_NEED_BUTTON TRUE
|
||||||
#define GWIN_NEED_SLIDER TRUE
|
#define GWIN_NEED_SLIDER TRUE
|
||||||
#define GWIN_NEED_CONTAINERS TRUE
|
#define GWIN_NEED_CONTAINERS TRUE
|
||||||
|
|
|
@ -25,6 +25,14 @@ static void _createWidgets(void) {
|
||||||
gwinWidgetClearInit(&wi);
|
gwinWidgetClearInit(&wi);
|
||||||
wi.g.show = TRUE;
|
wi.g.show = TRUE;
|
||||||
|
|
||||||
|
// Create a surprise label behind the frame window
|
||||||
|
wi.g.width = 100;
|
||||||
|
wi.g.height = 20;
|
||||||
|
wi.g.y = 100;
|
||||||
|
wi.g.x = 150;
|
||||||
|
wi.text = "Surprise!";
|
||||||
|
gwinLabelCreate(0, &wi);
|
||||||
|
|
||||||
// Apply the frame parameters
|
// Apply the frame parameters
|
||||||
wi.g.width = 300;
|
wi.g.width = 300;
|
||||||
wi.g.height = 200;
|
wi.g.height = 200;
|
||||||
|
|
Loading…
Add table
Reference in a new issue