cepheid

An Aurora 4X clone
Log | Files | Refs | README

commit c1c48c0c888a54fc3ef775e95cca23f7a0f929a9
parent bca3d6ff114aada012dd6d4be435043af80121bd
Author: hhvn <dev@hhvn.uk>
Date:   Thu,  1 Sep 2022 10:17:44 +0100

Call raylib's DrawRectangleLinesEx directly for borders

Diffstat:
M.gitignore | 1+
Msrc/ui.c | 7+++----
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -7,3 +7,4 @@ game testdb/ core.* tags +perf.* diff --git a/src/ui.c b/src/ui.c @@ -410,10 +410,9 @@ ui_draw_tabs(int x, int y, int w, int h, Tabs *tabs) { void ui_draw_border(int x, int y, int w, int h, int px) { - ui_draw_rectangle(x, y, w, px, col_border); /* top */ - ui_draw_rectangle(x, y, px, h, col_border); /* left */ - ui_draw_rectangle(x, y + h - px, w, px, col_border); /* bottom */ - ui_draw_rectangle(x + w - px, y, px, h, col_border); /* right */ + if (!pane_visible(y, y + h)) + return; + DrawRectangleLinesEx((Rectangle){x, y, w, h}, px, col_border); } void