diff options
| author | Simon <simon@hardwired.org.uk> | 2010-10-21 22:49:45 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2010-10-21 22:59:56 (GMT) |
| commit | f88bb0f246c7c7130b44d8b4b1b63012fadef94e (patch) | |
| tree | bb0eaface9db804cdaa31f366e5de497e4402807 /src/graphics.c | |
| parent | fdd3d240316086fdfd37840a828dc2111f5c70e2 (diff) | |
| download | powder-f88bb0f246c7c7130b44d8b4b1b63012fadef94e.zip powder-f88bb0f246c7c7130b44d8b4b1b63012fadef94e.tar.gz | |
Changes for open_ui
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) { |
