Added deinitialization of new slider textures

This commit is contained in:
Andreas Neumann 2018-01-25 21:55:48 +01:00
parent 2329df1eca
commit ce8a8616ad

View File

@ -89,6 +89,8 @@ void Settings_Deinitialize(){
SDL_DestroyTexture(Bar_Texture);
SDL_DestroyTexture(Return_Button_Texture);
SDL_DestroyTexture(Settings_Skins_Texture);
SDL_DestroyTexture(Scalar_Button_Texture0);
SDL_DestroyTexture(Scalar_Button_Texture1);
Settings_IsInit = false;
}
}
@ -106,8 +108,6 @@ void Draw_Slider(SDL_Renderer * renderer, Slider * beta){
IsLock=true;
}
if(beta->IsLock){
// SDL_RenderFillRect(renderer, &beta->Scalar_rect);
// SDL_RenderDrawRect(renderer, &beta->Scalar_rect);
SDL_RenderCopy(renderer, Scalar_Button_Texture1, NULL, &beta->Scalar_rect);
if (x > (beta->Bar_rect.x + beta->Bar_rect.w - (beta->Scalar_rect.w) / 2)) {
beta->Scalar_rect.x = (beta->Bar_rect.x + beta->Bar_rect.w - (beta->Scalar_rect.w));
@ -120,11 +120,9 @@ void Draw_Slider(SDL_Renderer * renderer, Slider * beta){
beta->Slider_value = x;
}
} else {
// SDL_RenderDrawRect(renderer, &beta->Scalar_rect);
SDL_RenderCopy(renderer, Scalar_Button_Texture0, NULL, &beta->Scalar_rect);
}
} else {
// SDL_RenderDrawRect(renderer, &beta->Scalar_rect);
SDL_RenderCopy(renderer, Scalar_Button_Texture0, NULL, &beta->Scalar_rect);
}
} /* Draw_Slider */