-
Notifications
You must be signed in to change notification settings - Fork 0
/
draw.cpp
35 lines (27 loc) · 880 Bytes
/
draw.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// draw.cpp
// IdleSow
//
// Created by IX on 2012-08-08.
//
//
#include "globals.h"
void DrawRectFill(int x, int y, int w, int h, vec4_t color)
{
oImport->R_DrawStretchPic( x, y, w, h, 0, 0, 1, 1, color, oImport->R_RegisterPic("gfx/ui/white"));
}
void DrawRectOutline(int x, int y, int w, int h, int borderthickness, vec4_t color)
{
// Draw the top line
DrawRectFill( x, y, w, borderthickness, color);
// Draw left side
DrawRectFill( x, y, borderthickness, h, color);
// Draw the right side
DrawRectFill( x + w, y, borderthickness, h, color);
// Draw the bottom
DrawRectFill( x, y + h, w, borderthickness, color);
}
void WriteText(int x, int y, const char *str, int align, int maxwidth, mufont_s* font, vec4_t color)
{
oImport->SCR_DrawStringWidth(x, y, align, str, maxwidth, font, color);
}