diff options
Diffstat (limited to 'src/mainMenu.c')
-rw-r--r-- | src/mainMenu.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mainMenu.c b/src/mainMenu.c index 370b71f..6041e4b 100644 --- a/src/mainMenu.c +++ b/src/mainMenu.c @@ -5,24 +5,24 @@ void initMainMenu(MainMenu* mainMenu, Game* game) { mainMenu->startButtonAnimation = createAnimation( - &game->assets.animations[PENGUIN_LOL_ANIMATION], + &game->assets.animations[BUTTON_BOX_ANIMATION], ANIMATION_DEFAULT_DELAY ); } void updateMainMenu(MainMenu* mainMenu, Game* game) { - ClearBackground(RAYWHITE); + // Draw background. + Texture background = game->assets.textures[PENGUIN_BACKGROUND_TEXTURE]; - DrawTextureEx(mainMenu->startButtonAnimation.texture, (Vector2){100.0, 100.0}, 0.0, 0.1, WHITE); - runAnimation(&mainMenu->startButtonAnimation); - - if (IsKeyPressed(KEY_SPACE)) - { - toggleAnimation(&mainMenu->startButtonAnimation); - } - - DrawFPS(0, 0); + DrawTexturePro( + background, + (Rectangle){0.0, 0.0, background.width, background.height}, + (Rectangle){0.0, 0.0, GetScreenWidth(), GetScreenHeight()}, + (Vector2){0.0, 0.0}, + 0.0, + WHITE + ); } void closeMainMenu(MainMenu* mainMenu) |