diff options
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c index b63e384..d6604a3 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1002,6 +1002,19 @@ int textnwidth(char *s, int n) } return x-1; } +int textnheight(char *s, int n, int w) +{ + int x = 0; + //TODO: Implement Textnheight for wrapped text + for(; *s; s++) + { + if(!n) + break; + x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + n--; + } + return x-1; +} int textwidthx(char *s, int w) { |
