examples/times_table: header color const
							parent
							
								
									00ce93d282
								
							
						
					
					
						commit
						257c21745a
					
				|  | @ -9,6 +9,7 @@ const ( | |||
| 	N            = MAX - MIN + 1 | ||||
| 	CELL_SIZE    = WIN_SIZE / N | ||||
| 	TEXT_CFG     = gx.TextCfg { color: gx.BLACK, size: FONT_SIZE } | ||||
| 	HEADER_COLOR = gx.rgb(240, 240, 240) | ||||
| ) | ||||
| 
 | ||||
| fn main() { | ||||
|  | @ -32,11 +33,11 @@ fn draw() { | |||
| 			x := CELL_SIZE * (j - MIN) | ||||
| 			// Horizontal header
 | ||||
| 			if i == MIN { | ||||
| 				gx.draw_rect(x, y, CELL_SIZE, CELL_SIZE, gx.rgb(240, 240, 240)) | ||||
| 				gx.draw_rect(x, y, CELL_SIZE, CELL_SIZE, HEADER_COLOR) | ||||
| 			} | ||||
| 			// Vertical header
 | ||||
| 			if j == MIN { | ||||
| 				gx.draw_rect(x, y, CELL_SIZE, CELL_SIZE, gx.rgb(240, 240, 240)) | ||||
| 				gx.draw_rect(x, y, CELL_SIZE, CELL_SIZE, HEADER_COLOR) | ||||
| 			} | ||||
| 			// Draw the result
 | ||||
| 			if !(i == MIN && j == MIN) { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue