blob: 7732f6d029e0956e4f8ccdbae47137c6ee51b5c4 (
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
|
#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;
return outp;
}
|