diff options
author | pixel <pixel> | 2005-12-01 13:48:12 +0000 |
---|---|---|
committer | pixel <pixel> | 2005-12-01 13:48:12 +0000 |
commit | 6f594ad00a07365eec68e16d338151dde23bb648 (patch) | |
tree | 07771966502e5b02c26f0f8414467d1dd78cd70b /lib/font.cc | |
parent | c492bb95a2bb8f739b7c0a061090b9ad4549c975 (diff) |
Lots of fixes and adds in mogltk:
-) fixed a compilation bug in the engine.h file (widget cyclic dependancy)
-) fixed font system so to have unsigned chars instead of chars
-) updated the shaper system so to have different fonts to print
-) updated the widgets with:
-) new methods: center, set_viewport, delete_me
-) Label now has a font
-) MsgBox now has a font
-) InputText widget added
-) InputDialog message box added
-) fixed a bug in the engine causing unwanted mouse move events
-) fixed a bug in the various lists of widgets (.clear != .empty)
Diffstat (limited to 'lib/font.cc')
-rw-r--r-- | lib/font.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/font.cc b/lib/font.cc index 07ade78..8527d15 100644 --- a/lib/font.cc +++ b/lib/font.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: font.cc,v 1.16 2004-11-27 21:48:03 pixel Exp $ */ +/* $Id: font.cc,v 1.17 2005-12-01 13:48:12 pixel Exp $ */ #include <stdarg.h> #include <SDL.h> @@ -306,7 +306,7 @@ void mogltk::font::putentryontex(texture * t, Uint16 entry, ColorP c) { cx += sizes[entry] + wspace; } -void mogltk::font::drawchar(char ch, ColorP c) { +void mogltk::font::drawchar(unsigned char ch, ColorP c) { Uint16 * p; int i; @@ -318,7 +318,7 @@ void mogltk::font::drawchar(char ch, ColorP c) { } } -void mogltk::font::drawcharontex(texture * t, char ch, ColorP c) { +void mogltk::font::drawcharontex(texture * t, unsigned char ch, ColorP c) { Uint16 * p; int i; @@ -330,7 +330,7 @@ void mogltk::font::drawcharontex(texture * t, char ch, ColorP c) { } } -int mogltk::font::findchar(char ch) const { +int mogltk::font::findchar(unsigned char ch) const { Uint16 * p; int i; @@ -424,7 +424,7 @@ mogltk::rect mogltk::font::size(const ugly_string & m, va_list ap) { w = 0; } } else { - w += sizes[findchar(*p)] + wspace; + w += sizes[findchar(*((unsigned char*)p))] + wspace; } } |