playbutton added, so hit that mf pull button to get a free copy of startmenu.c fellas

This commit is contained in:
Stefan Neumann 2018-01-15 14:08:09 +01:00
parent 89d295044d
commit 929322cc1e

View File

@ -4,14 +4,20 @@
#include <SDL2/SDL_image.h>
SDL_Texture* TITLE_Texture;
SDL_Rect TargetRect;
SDL_Texture* PLAYBUTTON_Texture;
SDL_Rect TITLE_Rect;
SDL_Rect PLAYBUTTON_Rect;
void Load_Textures (SDL_Renderer* renderer) {
TITLE_Texture = IMG_LoadTexture(renderer, "assets/images/breaking_button.png");
TargetRect = (SDL_Rect){.x = 583,.y = 100, .w=754, .h=334};
TITLE_Rect = (SDL_Rect){.x = 710,.y = 200, .w=500, .h=223};
PLAYBUTTON_Texture = IMG_LoadTexture(renderer, "assets/images/play_button.png");
PLAYBUTTON_Rect = (SDL_Rect){.x = 710, .y = 500, .w=391, .h=223};
}
void Startmenu_Draw (SDL_Renderer* renderer) {
SDL_RenderCopy(renderer, TITLE_Texture, NULL, &TargetRect);
SDL_RenderCopy(renderer, TITLE_Texture, NULL, &TITLE_Rect);
SDL_RenderCopy(renderer, PLAYBUTTON_Texture, NULL, &PLAYBUTTON_Rect);
}