Implements the main menu interface. More...
#include <UI_text.h>#include <app.h>#include <stdbool.h>#include <input.h>#include <sound.h>#include <controls.h>#include <math.h>Functions | |
| void | Menu_PrepareTextures () |
| [Start] Loads textures and creates UI elements for the menu | |
| void | Menu_Update () |
| [PostUpdate] Processes user input for menu buttons | |
| void | Menu_Render () |
| [Render] Draws the main menu to the screen | |
Variables | |
| SDL_Rect | startButtonRect = {27, 140, 200, 15} |
| SDL_Rect | controlsButtonRect = {27, 160, 200, 15} |
| SDL_Rect | exitButtonRect = {27, 180, 200, 15} |
| Vec2 | backgroundSize = {0, 0} |
Implements the main menu interface.
Handles layout, rendering, and interactions for the main menu screen, including buttons for starting the game, options, and exit.
| void Menu_PrepareTextures | ( | ) |
[Start] Loads textures and creates UI elements for the menu
Prepares and loads all menu textures.
Initializes all resources needed for the main menu, including the background, title, and button elements.
| void Menu_Render | ( | ) |
[Render] Draws the main menu to the screen
Renders the menu to the screen.
Renders the background, title, and interactive button elements with appropriate hover effects.
| void Menu_Update | ( | ) |
[PostUpdate] Processes user input for menu buttons
Updates the menu state based on user input.
Handles mouse hover and click events for the menu buttons, changing their appearance and triggering appropriate actions.
| Vec2 backgroundSize = {0, 0} |
| SDL_Rect controlsButtonRect = {27, 160, 200, 15} |
| SDL_Rect exitButtonRect = {27, 180, 200, 15} |
| SDL_Rect startButtonRect = {27, 140, 200, 15} |