stfu/Source/Maker/Widgets/border.c
2024-06-29 18:15:06 +03:00

27 lines
693 B
C

#if defined(STFU_MAIN) && !defined(STFU_BORDER)
#define STFU_BORDER
struct stfu_border {
float x, y;
float width, height;
float r, g, b;
};
static void stfu_draw_border(struct stfu_border border) {
{
sgl_begin_lines();
sgl_c3f(border.r, border.g, border.b);
sgl_v2f(border.x, border.y);
sgl_v2f(border.x + border.width, border.y);
sgl_v2f(border.x + border.width, border.y);
sgl_v2f(border.x + border.width, border.y + border.height);
sgl_v2f(border.x + border.width, border.y + border.height);
sgl_v2f(border.x, border.y + border.height);
sgl_v2f(border.x, border.y + border.height);
sgl_v2f(border.x, border.y);
sgl_end();
}
}
#endif