Start refactoring the UI code into an immediate mode style
This commit is contained in:
@@ -90,18 +90,18 @@ void draw_triangle(const window_t *wnd, const triangle_t *triangle,
|
||||
draw_line(wnd, &ln2, colour);
|
||||
}
|
||||
|
||||
void draw_rect(const window_t *wnd, const rect_t *rect, colour_t colour) {
|
||||
void draw_rect(const window_t *wnd, rect_t rect, colour_t colour) {
|
||||
set_colour(wnd, colour);
|
||||
|
||||
SDL_Rect dst = {rect->topleft.x, rect->topleft.y, rect->w, rect->h};
|
||||
SDL_Rect dst = {rect.topleft.x, rect.topleft.y, rect.w, rect.h};
|
||||
|
||||
SDL_RenderDrawRect(wnd->renderer, &dst);
|
||||
}
|
||||
|
||||
void fill_rect(const window_t *wnd, const rect_t *rect, colour_t colour) {
|
||||
void fill_rect(const window_t *wnd, rect_t rect, colour_t colour) {
|
||||
set_colour(wnd, colour);
|
||||
|
||||
SDL_Rect dst = {rect->topleft.x, rect->topleft.y, rect->w, rect->h};
|
||||
SDL_Rect dst = {rect.topleft.x, rect.topleft.y, rect.w, rect.h};
|
||||
|
||||
SDL_RenderFillRect(wnd->renderer, &dst);
|
||||
}
|
||||
|
Reference in New Issue
Block a user