From 6f594ad00a07365eec68e16d338151dde23bb648 Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 1 Dec 2005 13:48:12 +0000 Subject: 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) --- lib/font.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/font.cc') 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 #include @@ -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; } } -- cgit v1.2.3