diff options
author | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-02-16 17:31:41 +0000 |
---|---|---|
committer | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-02-16 17:31:41 +0000 |
commit | 2a3b0c6057d913d931d5db361b004c89e78d0385 (patch) | |
tree | 89524e8030f126381b4346169919d7cda3287250 /src/mainMenu.c | |
parent | 12b80da7f61df440a6e3252012436fb0baebe073 (diff) | |
download | PenguinYippies-2a3b0c6057d913d931d5db361b004c89e78d0385.tar.gz PenguinYippies-2a3b0c6057d913d931d5db361b004c89e78d0385.tar.bz2 PenguinYippies-2a3b0c6057d913d931d5db361b004c89e78d0385.zip |
Animation working
Diffstat (limited to 'src/mainMenu.c')
-rw-r--r-- | src/mainMenu.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mainMenu.c b/src/mainMenu.c index ec8bd95..e5d3b60 100644 --- a/src/mainMenu.c +++ b/src/mainMenu.c @@ -1,14 +1,27 @@ #include "mainMenu.h" #include "game.h" +#include "assets.h" +#include <raylib.h> void initMainMenu(MainMenu* mainMenu, Game* game) { + mainMenu->startButtonAnimation = createAnimation( + &game->assets.animations[BUTTON_BOX_ANIMATION], + ANIMATION_DEFAULT_DELAY + ); } void updateMainMenu(MainMenu* mainMenu, Game* game) { + ClearBackground(RAYWHITE); + + DrawTextureEx(mainMenu->startButtonAnimation.texture, (Vector2){100.0, 100.0}, 0.0, 1.0, WHITE); + runAnimation(&mainMenu->startButtonAnimation); + + DrawFPS(0, 0); } void closeMainMenu(MainMenu* mainMenu) { + closeAnimation(&mainMenu->startButtonAnimation); } |