diff options
| author | jacob1 <jfu614@gmail.com> | 2013-05-05 03:03:59 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-05-05 03:03:59 (GMT) |
| commit | 07486c9885fdfde734c5f052a8c31e1af26acfeb (patch) | |
| tree | c279fef5027933db0c83aa38bfcc10727236e169 /src/graphics/RasterDrawMethods.inl | |
| parent | 2d0ce60afe568fb129872abf674aec12cb520907 (diff) | |
| download | powder-07486c9885fdfde734c5f052a8c31e1af26acfeb.zip powder-07486c9885fdfde734c5f052a8c31e1af26acfeb.tar.gz | |
drawtext_outline to fix unreadable infotips, tooltips fade in and out (more like old tpt)
Diffstat (limited to 'src/graphics/RasterDrawMethods.inl')
| -rw-r--r-- | src/graphics/RasterDrawMethods.inl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/graphics/RasterDrawMethods.inl b/src/graphics/RasterDrawMethods.inl index 527d249..b4de875 100644 --- a/src/graphics/RasterDrawMethods.inl +++ b/src/graphics/RasterDrawMethods.inl @@ -1,5 +1,16 @@ #include "font.h" +int PIXELMETHODS_CLASS::drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a) +{ + drawtext(x-1, y-1, s, 0, 0, 0, 120); + drawtext(x+1, y+1, s, 0, 0, 0, 120); + + drawtext(x-1, y+1, s, 0, 0, 0, 120); + drawtext(x+1, y-1, s, 0, 0, 0, 120); + + return drawtext(x, y, s, r, g, b, a); +} + int PIXELMETHODS_CLASS::drawtext(int x, int y, const char *s, int r, int g, int b, int a) { if(!strlen(s)) |
