From 10812e621a4cf485a62d76444a6af5dec6cc92f1 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Thu, 4 Oct 2007 22:00:10 +0000 Subject: added teamchat --- src/engine/client/gfx.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/engine/client/gfx.c') 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) -- cgit 1.4.1