edited main_menu (ready now)
This commit is contained in:
parent
7e9eaf5861
commit
eb0fc4bc05
BIN
bin/assets/images/highscores_button.png
Normal file
BIN
bin/assets/images/highscores_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
bin/assets/images/level_button.png
Normal file
BIN
bin/assets/images/level_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
BIN
bin/assets/images/quit_button.png
Normal file
BIN
bin/assets/images/quit_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
34
startmenu.c
34
startmenu.c
@ -5,19 +5,49 @@
|
||||
|
||||
SDL_Texture* TITLE_Texture;
|
||||
SDL_Texture* PLAYBUTTON_Texture;
|
||||
SDL_Texture* SKINSBUTTON_Texture;
|
||||
SDL_Texture* LEVELBUTTON_Texture;
|
||||
SDL_Texture* SETTINGSBUTTON_Texture;
|
||||
SDL_Texture* HIGHSCORESBUTTON_Texture;
|
||||
SDL_Texture* QUITBUTTON_Texture;
|
||||
|
||||
SDL_Rect TITLE_Rect;
|
||||
SDL_Rect PLAYBUTTON_Rect;
|
||||
SDL_Rect SETTINGSBUTTON_Rect;
|
||||
SDL_Rect LEVELBUTTON_Rect;
|
||||
SDL_Rect SKINSBUTTON_Rect;
|
||||
SDL_Rect HIGHSCORESBUTTON_Rect;
|
||||
SDL_Rect QUITBUTTON_Rect;
|
||||
|
||||
void Load_Textures (SDL_Renderer* renderer) {
|
||||
TITLE_Texture = IMG_LoadTexture(renderer, "assets/images/breaking_button.png");
|
||||
TITLE_Rect = (SDL_Rect){.x = 710,.y = 200, .w=500, .h=223};
|
||||
TITLE_Rect = (SDL_Rect){.x = 685,.y = 50, .w=550, .h=250};
|
||||
|
||||
PLAYBUTTON_Texture = IMG_LoadTexture(renderer, "assets/images/play_button.png");
|
||||
PLAYBUTTON_Rect = (SDL_Rect){.x = 710, .y = 500, .w=391, .h=223};
|
||||
PLAYBUTTON_Rect = (SDL_Rect){.x = 497, .y = 400, .w=313, .h=178};
|
||||
|
||||
SKINSBUTTON_Texture = IMG_LoadTexture(renderer, "assets/images/skins_button.png");
|
||||
SKINSBUTTON_Rect = (SDL_Rect){.x = 1110, .y = 400, .w=313, .h=178};
|
||||
|
||||
LEVELBUTTON_Texture = IMG_LoadTexture(renderer, "assets/images/level_button.png");
|
||||
LEVELBUTTON_Rect = (SDL_Rect){.x = 497, .y = 700, .w=313, .h=178};
|
||||
|
||||
SETTINGSBUTTON_Texture = IMG_LoadTexture(renderer, "assets/images/settings_button.png");
|
||||
SETTINGSBUTTON_Rect = (SDL_Rect){.x = 1110, .y = 700, .w=313, .h=178};
|
||||
|
||||
HIGHSCORESBUTTON_Texture = IMG_LoadTexture(renderer, "assets/images/highscores_button.png");
|
||||
HIGHSCORESBUTTON_Rect = (SDL_Rect){.x = 1557, .y = 120, .w=313, .h=178};
|
||||
|
||||
QUITBUTTON_Texture = IMG_LoadTexture(renderer, "assets/images/quit_button.png");
|
||||
QUITBUTTON_Rect = (SDL_Rect){.x = 50, .y = 896 , .w=235, .h=134};
|
||||
}
|
||||
|
||||
void Startmenu_Draw (SDL_Renderer* renderer) {
|
||||
SDL_RenderCopy(renderer, TITLE_Texture, NULL, &TITLE_Rect);
|
||||
SDL_RenderCopy(renderer, PLAYBUTTON_Texture, NULL, &PLAYBUTTON_Rect);
|
||||
SDL_RenderCopy(renderer, SKINSBUTTON_Texture, NULL, &SKINSBUTTON_Rect);
|
||||
SDL_RenderCopy(renderer, LEVELBUTTON_Texture, NULL, &LEVELBUTTON_Rect);
|
||||
SDL_RenderCopy(renderer, SETTINGSBUTTON_Texture, NULL, &SETTINGSBUTTON_Rect);
|
||||
SDL_RenderCopy(renderer, HIGHSCORESBUTTON_Texture, NULL, &HIGHSCORESBUTTON_Rect);
|
||||
SDL_RenderCopy(renderer, QUITBUTTON_Texture, NULL, &QUITBUTTON_Rect);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user