blob: 93b56998c639a5a8dafaf737b38d4a267d2bd0d0 (
plain)
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
|
#include <raylib.h>
#include <stdlib.h>
#include "scenes.h"
#include "../resources/resources.h"
bool updateMainMenu(void *self) {
return true;
}
bool drawMainMenu(void *self) {
DrawBackground();
DrawText("Main menu", 0, 0, 100, BLACK);
return true;
}
void deinitMainMenu(void *self) {
TraceLog(LOG_INFO, "Deleting a main menu");
free((Scene *)self);
}
Scene *CreateMainMenu() {
TraceLog(LOG_INFO, "Creating a main menu");
Scene *outp = malloc(sizeof(Scene));
outp->Update = updateMainMenu;
outp->Draw = drawMainMenu;
outp->Deint = deinitMainMenu;
outp->Reopen = NULL;
outp->GetCurrentState = NULL;
outp->IsTransparent = false;
return outp;
}
|