diff options
author | Andrew Hannam <andrewh@inmarket.com.au> | 2012-12-07 00:52:01 +1000 |
---|---|---|
committer | Andrew Hannam <andrewh@inmarket.com.au> | 2012-12-07 00:52:01 +1000 |
commit | 5873d87ca2185e825f1187eca3bc7f0de7437e69 (patch) | |
tree | da1a2f56b60d9495cafef79734082660f39abaf2 /demos/modules/console/main.c | |
parent | ec89b8e82d890066f60c48349da062add76db6cd (diff) | |
download | uGFX-5873d87ca2185e825f1187eca3bc7f0de7437e69.tar.gz uGFX-5873d87ca2185e825f1187eca3bc7f0de7437e69.tar.bz2 uGFX-5873d87ca2185e825f1187eca3bc7f0de7437e69.zip |
Add GDISP font routines. Fix demo bugs
Add GDISP font routines to Open and Close a font by name.
Allows wildcard searching for fonts.
Old global font variables are now only optionally included (soon to be
deprecated).
More demo fixing
Diffstat (limited to 'demos/modules/console/main.c')
-rw-r--r-- | demos/modules/console/main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/demos/modules/console/main.c b/demos/modules/console/main.c index 830c9d00..1227e89a 100644 --- a/demos/modules/console/main.c +++ b/demos/modules/console/main.c @@ -37,6 +37,7 @@ BaseSequentialStream *S1, *S2, *S3; int main(void) {
uint8_t i;
+ font_t font1, font2;
halInit();
chSysInit();
@@ -44,11 +45,13 @@ int main(void) { /* initialize and clear the display */
gdispInit();
gdispClear(Black);
+ font1 = gdispOpenFont("UI2 Double");
+ font2 = gdispOpenFont("Small");
/* create the three console windows and set a font for each */
- GW1 = gwinCreateConsole(NULL, 0, 0, gdispGetWidth(), gdispGetHeight()/2, &fontUI2Double);
- GW2 = gwinCreateConsole(NULL, 0, gdispGetHeight()/2, gdispGetWidth()/2, gdispGetHeight(), &fontSmall);
- GW3 = gwinCreateConsole(NULL, gdispGetWidth()/2, gdispGetHeight()/2, gdispGetWidth(), gdispGetHeight(), &fontSmall);
+ GW1 = gwinCreateConsole(NULL, 0, 0, gdispGetWidth(), gdispGetHeight()/2, font1);
+ GW2 = gwinCreateConsole(NULL, 0, gdispGetHeight()/2, gdispGetWidth()/2, gdispGetHeight(), font2);
+ GW3 = gwinCreateConsole(NULL, gdispGetWidth()/2, gdispGetHeight()/2, gdispGetWidth(), gdispGetHeight(), font2);
/* Set the fore- and background colors for each console */
gwinSetColor(GW1, Green);
|