-
Notifications
You must be signed in to change notification settings - Fork 0
/
scoreMenu.c
54 lines (44 loc) · 2.01 KB
/
scoreMenu.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*******************************************************************************************
*
* Smurf Invaders. Technical Demo as an explorative project of Raylib.
* Random game based on Space Invaders and alike.
*
* Copyright (c) 2020 Oscar Lostes Cazorla, under MIT license.
*
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
* Raylib by Ramon Santamaria (@raysan5), Copyright (c) 2013-2020
*
********************************************************************************************/
#include "scoreMenu.h"
State scoreMenu()
{
// Initialization
//--------------------------------------------------------------------------------------
// Initaize HUD displays
//TextCopy(healthDisp, TextFormat("LIVES: %d", health));
//TextCopy(scoreDisp, TextFormat("SCORE: %d", score));
SetExitKey(KEY_PAUSE);
//--------------------------------------------------------------------------------------
// Main game loop
while (true) // Detect window close button or ESC key. Dummy exit on player killed
{
// Update
//----------------------------------------------------------------------------------
if (IsKeyPressed(KEY_ESCAPE)) return MAIN_M;
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
{
ClearBackground(RAYWHITE); // Clear background
// Menu drawing
DrawText("SCORE", screenWidth / 2 - MeasureText("SCORE", 40) / 2, screenHeight / 2 - 10, 40, DARKGREEN);
DrawText("Press ESCAPE to return main menu", screenWidth / 2 - MeasureText("Press ESCAPE to return main menu", 20) / 2, screenHeight / 2 + 50, 20, BLUE);
}
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------
}