added fill to rect, and returns when ARC_Config_Get has a null temp value
This commit is contained in:
parent
0d9cf0f7f5
commit
b2055f667c
3 changed files with 13 additions and 0 deletions
|
|
@ -12,6 +12,8 @@ extern "C" {
|
||||||
|
|
||||||
void ARC_Rect_Render(ARC_Rect *rect, ARC_Renderer *renderer, ARC_Color *color);
|
void ARC_Rect_Render(ARC_Rect *rect, ARC_Renderer *renderer, ARC_Color *color);
|
||||||
|
|
||||||
|
void ARC_Rect_RenderFill(ARC_Rect *rect, ARC_Renderer *renderer, ARC_Color *color);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,9 @@ void ARC_Rect_Render(ARC_Rect *rect, ARC_Renderer *renderer, ARC_Color *color){
|
||||||
SDL_RenderDrawRect(renderer->renderer, (SDL_Rect *) rect);
|
SDL_RenderDrawRect(renderer->renderer, (SDL_Rect *) rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ARC_Rect_RenderFill(ARC_Rect *rect, ARC_Renderer *renderer, ARC_Color *color){
|
||||||
|
SDL_SetRenderDrawColor(renderer->renderer, color->r, color->g, color->b, color->a);
|
||||||
|
SDL_RenderFillRect(renderer->renderer, (SDL_Rect *) rect);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // ARC_SDL
|
#endif // ARC_SDL
|
||||||
|
|
@ -156,6 +156,12 @@ void ARC_Config_Get(ARC_Config *config, ARC_String *keyname, void **value){
|
||||||
if(group){
|
if(group){
|
||||||
ARC_String_Destroy(group);
|
ARC_String_Destroy(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(temp == NULL){
|
||||||
|
*value = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
*value = temp->data;
|
*value = temp->data;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue