27 lines
693 B
C
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
|