aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-05-11 13:59:48 +0200
committerJoel Bodenmann <joel@unormal.org>2014-05-11 13:59:48 +0200
commit9e6b210425b046107dc58e166d1b3f6de3eb552e (patch)
treec6b90f6751fe05f56a5f3f2a6e3b40569eda7dfd /demos
parent6a0e79903d03caa42c595aafd892193982cbcb7c (diff)
downloaduGFX-9e6b210425b046107dc58e166d1b3f6de3eb552e.tar.gz
uGFX-9e6b210425b046107dc58e166d1b3f6de3eb552e.tar.bz2
uGFX-9e6b210425b046107dc58e166d1b3f6de3eb552e.zip
simplify gwin widgets demo code
Diffstat (limited to 'demos')
-rw-r--r--demos/modules/gwin/widgets/main.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c
index 52dfbfc1..1af28b1b 100644
--- a/demos/modules/gwin/widgets/main.c
+++ b/demos/modules/gwin/widgets/main.c
@@ -317,14 +317,14 @@ static void createWidgets(void) {
*/
static void setTab(GHandle tab) {
/* Make sure everything is invisible first */
- gwinSetVisible(ghPgButtons, FALSE);
- gwinSetVisible(ghPgSliders, FALSE);
- gwinSetVisible(ghPgCheckboxes, FALSE);
- gwinSetVisible(ghPgLabels, FALSE);
- gwinSetVisible(ghPgRadios, FALSE);
- gwinSetVisible(ghPgLists, FALSE);
- gwinSetVisible(ghPgImages, FALSE);
- gwinSetVisible(ghPgProgressbars, FALSE);
+ gwinHide(ghPgButtons);
+ gwinHide(ghPgSliders);
+ gwinHide(ghPgCheckboxes);
+ gwinHide(ghPgLabels);
+ gwinHide(ghPgRadios);
+ gwinHide(ghPgLists);
+ gwinHide(ghPgImages);
+ gwinHide(ghPgProgressbars);
// Stop the progress bar
gwinProgressbarStop(ghProgressbar1);
@@ -332,21 +332,21 @@ static void setTab(GHandle tab) {
/* Turn on widgets depending on the tab selected */
if (tab == ghTabButtons) {
- gwinSetVisible(ghPgButtons, TRUE);
+ gwinShow(ghPgButtons);
} else if (tab == ghTabSliders) {
- gwinSetVisible(ghPgSliders, TRUE);
+ gwinShow(ghPgSliders);
} else if (tab == ghTabCheckboxes) {
- gwinSetVisible(ghPgCheckboxes, TRUE);
+ gwinShow(ghPgCheckboxes);
} else if (tab == ghTabLabels) {
- gwinSetVisible(ghPgLabels, TRUE);
+ gwinShow(ghPgLabels);
} else if (tab == ghTabRadios) {
- gwinSetVisible(ghPgRadios, TRUE);
+ gwinShow(ghPgRadios);
} else if (tab == ghTabLists) {
- gwinSetVisible(ghPgLists, TRUE);
+ gwinShow(ghPgLists);
} else if (tab == ghTabImages) {
- gwinSetVisible(ghPgImages, TRUE);
+ gwinShow(ghPgImages);
} else if (tab == ghTabProgressbar) {
- gwinSetVisible(ghPgProgressbars, TRUE);
+ gwinShow(ghPgProgressbars);
// Start the progress bar
gwinProgressbarStart(ghProgressbar1, 500);
@@ -401,7 +401,7 @@ int main(void) {
#endif
// Make the console visible
- gwinSetVisible(ghConsole, TRUE);
+ gwinShow(ghConsole);
gwinClear(ghConsole);
// We want to listen for widget events