diff options
| author | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-07-07 16:04:29 +0500 |
|---|---|---|
| committer | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-07-07 16:04:29 +0500 |
| commit | de52d82dc62db5d6883cf870a2c3cdc08a178b4f (patch) | |
| tree | 5c1f61c104bdd4c7017cef90de87d3582def547c /src/scenes/mainMenu.c | |
| parent | ed2a75816a34aee3026cb07c85fb3be11decbf4d (diff) | |
Scene stack logic
Diffstat (limited to 'src/scenes/mainMenu.c')
| -rw-r--r-- | src/scenes/mainMenu.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/scenes/mainMenu.c b/src/scenes/mainMenu.c index 07ba34d..31b52c0 100644 --- a/src/scenes/mainMenu.c +++ b/src/scenes/mainMenu.c @@ -1,9 +1,27 @@ #include <raylib.h> +#include <stdlib.h> +#include "scenes.h" -void MainMenuUpdate() { +bool updateMainMenu(void *self) { + return true; } -void MainMenuDraw() { +bool drawMainMenu(void *self) { ClearBackground(SKYBLUE); - DrawText("MAIN MENU", 10, 10, 30, BLACK); + 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; } |
