Added deinitialization of new slider textures
This commit is contained in:
parent
2329df1eca
commit
ce8a8616ad
10
settings.c
10
settings.c
@ -89,6 +89,8 @@ void Settings_Deinitialize(){
|
|||||||
SDL_DestroyTexture(Bar_Texture);
|
SDL_DestroyTexture(Bar_Texture);
|
||||||
SDL_DestroyTexture(Return_Button_Texture);
|
SDL_DestroyTexture(Return_Button_Texture);
|
||||||
SDL_DestroyTexture(Settings_Skins_Texture);
|
SDL_DestroyTexture(Settings_Skins_Texture);
|
||||||
|
SDL_DestroyTexture(Scalar_Button_Texture0);
|
||||||
|
SDL_DestroyTexture(Scalar_Button_Texture1);
|
||||||
Settings_IsInit = false;
|
Settings_IsInit = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,8 +108,6 @@ void Draw_Slider(SDL_Renderer * renderer, Slider * beta){
|
|||||||
IsLock=true;
|
IsLock=true;
|
||||||
}
|
}
|
||||||
if(beta->IsLock){
|
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);
|
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)) {
|
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));
|
beta->Scalar_rect.x = (beta->Bar_rect.x + beta->Bar_rect.w - (beta->Scalar_rect.w));
|
||||||
@ -120,12 +120,10 @@ void Draw_Slider(SDL_Renderer * renderer, Slider * beta){
|
|||||||
beta->Slider_value = x;
|
beta->Slider_value = x;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// SDL_RenderDrawRect(renderer, &beta->Scalar_rect);
|
SDL_RenderCopy(renderer, Scalar_Button_Texture0, NULL, &beta->Scalar_rect);
|
||||||
SDL_RenderCopy(renderer, Scalar_Button_Texture0, NULL, &beta->Scalar_rect);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// SDL_RenderDrawRect(renderer, &beta->Scalar_rect);
|
SDL_RenderCopy(renderer, Scalar_Button_Texture0, NULL, &beta->Scalar_rect);
|
||||||
SDL_RenderCopy(renderer, Scalar_Button_Texture0, NULL, &beta->Scalar_rect);
|
|
||||||
}
|
}
|
||||||
} /* Draw_Slider */
|
} /* Draw_Slider */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user