diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-10-04 22:00:10 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-10-04 22:00:10 +0000 |
| commit | 10812e621a4cf485a62d76444a6af5dec6cc92f1 (patch) | |
| tree | dc31febf0a946c2dce1d70e792f0e66d3dc2f47e /src/engine/client/gfx.c | |
| parent | 855f16c18b724b0e88b495b78a5a5852617958f9 (diff) | |
| download | zcatch-10812e621a4cf485a62d76444a6af5dec6cc92f1.tar.gz zcatch-10812e621a4cf485a62d76444a6af5dec6cc92f1.zip | |
added teamchat
Diffstat (limited to 'src/engine/client/gfx.c')
| -rw-r--r-- | src/engine/client/gfx.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/engine/client/gfx.c b/src/engine/client/gfx.c index e2aa1c81..05ebcb1c 100644 --- a/src/engine/client/gfx.c +++ b/src/engine/client/gfx.c @@ -807,12 +807,28 @@ static int word_length(const char *text) } } + + +static float pretty_r=1; +static float pretty_g=1; +static float pretty_b=1; +static float pretty_a=1; + +void gfx_pretty_text_color(float r, float g, float b, float a) +{ + pretty_r = r; + pretty_g = g; + pretty_b = b; + pretty_a = a; +} + float gfx_pretty_text_raw(float x, float y, float size, const char *text_, int length) { const unsigned char *text = (unsigned char *)text_; const float spacing = 0.05f; gfx_texture_set(current_font->font_texture); gfx_quads_begin(); + gfx_setcolor(pretty_r, pretty_g, pretty_b, pretty_a); if(length < 0) length = strlen(text_); @@ -847,6 +863,8 @@ float gfx_pretty_text_raw(float x, float y, float size, const char *text_, int l return x; } + + void gfx_pretty_text(float x, float y, float size, const char *text, int max_width) { if(max_width == -1) |