summaryrefslogtreecommitdiff
path: root/src/scenes/mainMenu.c
blob: 5b6408fa1fc5f5d346eec7ba0115f3d0f6e6c785 (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
32
#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->IsTransparent = false;

    outp->Reopen = NULL;
    outp->GetCurrentState = NULL;
    return outp;
}