Add information message

This commit is contained in:
Amine B. Hassouna
2018-11-20 19:05:36 +01:00
parent 34b6abace7
commit a595081fac
2 changed files with 6 additions and 0 deletions

View File

@@ -33,6 +33,7 @@
#include <SDL2/SDL.h>
#include <SDL2/SDL2_framerate.h>
#include <SDL2/SDL2_gfxPrimitives.h>
#include "grid.h"

View File

@@ -160,6 +160,11 @@ bool Game_start(SDL_Renderer *renderer, int w, int h)
// Render grid
Grid_render(&grid, renderer);
// Show message
stringRGBA(renderer, grid.rect.x + grid.xCells, grid.rect.y - 20,
"This is a falling brick < Press RIGTH and LEFT to move >",
COLOR_LIGHT_GRAY.r, COLOR_LIGHT_GRAY.g, COLOR_LIGHT_GRAY.b, COLOR_LIGHT_GRAY.a);
// Update screen
SDL_RenderPresent(renderer);