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:
		
							
								
								
									
										6
									
								
								pong.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								pong.c
									
									
									
									
									
								
							@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user