diff options
| author | jacob1 <jfu614@gmail.com> | 2013-07-15 17:09:19 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-07-15 17:09:19 (GMT) |
| commit | 8d5fe459fe4e0b9d398d9eb6d273b71da1a77eec (patch) | |
| tree | bf8a21584643a7f0fbfed9a6fb28ca62a0e3b4c0 /src/graphics/Graphics.cpp | |
| parent | 0214fcb5aedd6f4ebd485388c1fe1cfd63eb82a0 (diff) | |
| download | powder-8d5fe459fe4e0b9d398d9eb6d273b71da1a77eec.zip powder-8d5fe459fe4e0b9d398d9eb6d273b71da1a77eec.tar.gz | |
'n' to toggle Newtonian Gravity, quickoption tooltips show which keys you need to press to toggle them
Diffstat (limited to 'src/graphics/Graphics.cpp')
| -rw-r--r-- | src/graphics/Graphics.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/graphics/Graphics.cpp b/src/graphics/Graphics.cpp index 09da936..0b7e502 100644 --- a/src/graphics/Graphics.cpp +++ b/src/graphics/Graphics.cpp @@ -573,7 +573,19 @@ int Graphics::textwidth(const char *s) { int x = 0; for (; *s; s++) + { + if(((char)*s)=='\b') + { + if(!s[1]) break; + s++; + continue; + } else if(*s == '\x0F') { + if(!s[1] || !s[2] || !s[3]) break; + s+=3; + continue; + } x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + } return x-1; } |
