diff --git a/settings.c b/settings.c index 1405bb5..48f84db 100644 --- a/settings.c +++ b/settings.c @@ -27,7 +27,7 @@ void Settings_Initialize (SDL_Renderer* renderer) { Initialize_Slider(400,500,Scalar_width,Bar_width,Slider_height,10.0f,20.0f,&BS); Initialize_Slider(400,700,Scalar_width,Bar_width,Slider_height,0,1,&BT); Settings_Texture = IMG_LoadTexture(renderer, "assets/images/settings_title.png"); - Settings_rect = (SDL_Rect){.x = 800, .y = 180, .w=313, .h=100}; + Settings_rect = (SDL_Rect){.x = 800, .y = 130, .w=470, .h=150}; Settings_Ball_Texture = IMG_LoadTexture(renderer, "assets/images/ball.png"); Settings_Ball_rect = (SDL_Rect){.x = 1200, .y = 300, .w=100, .h=100}; Settings_IsInit = true; diff --git a/startmenu.c b/startmenu.c index c39bb64..caf7192 100644 --- a/startmenu.c +++ b/startmenu.c @@ -9,8 +9,6 @@ extern float XScale, YScale; 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; @@ -18,8 +16,6 @@ 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; @@ -36,16 +32,10 @@ void Load_Textures(SDL_Renderer * renderer) { 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 = 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 }; + PLAYBUTTON_Rect = (SDL_Rect) {.x = 772, .y = 420, .w = 376, .h = 214 }; SETTINGSBUTTON_Texture = IMG_LoadTexture(renderer, "assets/images/settings_button.png"); - SETTINGSBUTTON_Rect = (SDL_Rect) {.x = 1110, .y = 700, .w = 313, .h = 178 }; + SETTINGSBUTTON_Rect = (SDL_Rect) {.x = 772, .y = 720, .w = 376, .h = 214 }; HIGHSCORESBUTTON_Texture = IMG_LoadTexture(renderer, "assets/images/highscores_button.png"); HIGHSCORESBUTTON_Rect = (SDL_Rect) {.x = 1557, .y = 120, .w = 313, .h = 178 }; @@ -57,8 +47,6 @@ void Load_Textures(SDL_Renderer * renderer) { 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); @@ -68,10 +56,6 @@ void button_clicked(SDL_MouseButtonEvent b, GameState gameState) { if (gameState == MainMenu) { if (clickInRect(b, &PLAYBUTTON_Rect) == 1) { GAME_ChangeState(Game); - } else if (clickInRect(b, &SKINSBUTTON_Rect) == 1) { - GAME_ChangeState(SkinSelect); - } else if (clickInRect(b, &LEVELBUTTON_Rect) == 1) { - GAME_ChangeState(LevelSelect); } else if (clickInRect(b, &SETTINGSBUTTON_Rect) == 1) { GAME_ChangeState(Settings); } else if (clickInRect(b, &HIGHSCORESBUTTON_Rect) == 1) {