Random fixes and improvements

* Add black background and help text to pong
* Call last-added touch handlers first
* Always call all touch handlers, but set ev->consumed after
  first successful handler
* Fix fb_draw_rect on RGE565
This commit is contained in:
Vojtech Bocek
2014-07-03 02:25:57 +02:00
parent 7797f90eff
commit 14f4828625
11 changed files with 72 additions and 93 deletions

6
pong.c
View File

@@ -85,6 +85,12 @@ void pong(void)
score_val[L] = 0;
score_val[R] = 0;
fb_set_background(BLACK);
fb_text *help = fb_add_text(0, 0, GRAYISH, SIZE_SMALL, "Press power button to go back");
help->y = fb_height/2 - help->h*1.5;
center_text(help, 0, -1, fb_width, -1);
// middle line
fb_add_rect(0, fb_height/2 - 1, fb_width, 1, WHITE);