1#include "all.h"
 2
 3void update_menu(void) {
 4	if (IsKeyPressed(KEY_ENTER)) {
 5		if (load_map(game.map_path)) {
 6			game.mode = STATE_PLAYING;
 7			game.cursor_captured = true;
 8			DisableCursor();
 9		}
10	}
11}
12
13void draw_menu(void) {
14	BeginDrawing();
15	ClearBackground(BLACK);
16
17	int screenWidth = GetScreenWidth();
18	int screenHeight = GetScreenHeight();
19
20	const char *title = "STALAG";
21	const char *sub = "Press ENTER to Start";
22
23	int titleSize = 60;
24	int subSize = 20;
25
26	Vector2 titlePos = { 
27		(float)(screenWidth - MeasureTextEx(game.font_ui, title, (float)titleSize, 4).x) / 2, 
28		(float)screenHeight / 2 - 40 
29	};
30	Vector2 subPos = { 
31		(float)(screenWidth - MeasureTextEx(game.font_ui, sub, (float)subSize, 2).x) / 2, 
32		(float)screenHeight / 2 + 40 
33	};
34
35	DrawTextEx(game.font_ui, title, titlePos, (float)titleSize, 4, WHITE);
36	DrawTextEx(game.font_ui, sub, subPos, (float)subSize, 2, GRAY);
37
38	EndDrawing();
39}