diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-01 18:45:59 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-01 18:45:59 (GMT) |
| commit | 038da72c61ea6a251d805e2de3662f240da52b02 (patch) | |
| tree | 05170050b16f9d663ec44ae451211e686ba196ac /src/Graphics.cpp | |
| parent | 857b0cc1fc58f066acd59404d16ee5e566e20f00 (diff) | |
| download | powder-038da72c61ea6a251d805e2de3662f240da52b02.zip powder-038da72c61ea6a251d805e2de3662f240da52b02.tar.gz | |
Console UI, open in browser button, tab and enter shortcut for Login UI, various
Diffstat (limited to 'src/Graphics.cpp')
| -rw-r--r-- | src/Graphics.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Graphics.cpp b/src/Graphics.cpp index 678e138..9d9c36b 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -993,6 +993,11 @@ int Graphics::textnwidth(char *s, int n) { if (!n) break; + if(((char)*s)=='\b') + { + s++; + continue; + } x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; n--; } @@ -1035,6 +1040,11 @@ int Graphics::textwidthx(char *s, int w) int x=0,n=0,cw; for (; *s; s++) { + if((char)*s == '\b') + { + s++; + continue; + } cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; if (x+(cw/2) >= w) break; |
