diff options
| -rw-r--r-- | gui/newgui.cpp | 6 | ||||
| -rw-r--r-- | gui/newgui.h | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp index ed58bda981..767c5776c9 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -373,8 +373,10 @@ void NewGui::addDirtyRect(int x, int y, int w, int h) { _system->copyRectToOverlay(buf, _screenPitch, x, y, w, h); } -void NewGui::drawChar(byte chr, int xx, int yy, OverlayColor color) { - getFont().drawChar(&_screen, chr, xx, yy, color); +void NewGui::drawChar(byte chr, int xx, int yy, OverlayColor color, const Graphics::Font *font) { + if (font == 0) + font = &getFont(); + font->drawChar(&_screen, chr, xx, yy, color); } int NewGui::getStringWidth(const String &str) { diff --git a/gui/newgui.h b/gui/newgui.h index 8200d9f722..82b2af1a94 100644 --- a/gui/newgui.h +++ b/gui/newgui.h @@ -128,10 +128,12 @@ public: void fillRect(int x, int y, int w, int h, OverlayColor color); void checkerRect(int x, int y, int w, int h, OverlayColor color); void frameRect(int x, int y, int w, int h, OverlayColor color); - void drawChar(byte c, int x, int y, OverlayColor color); + + void drawChar(byte c, int x, int y, OverlayColor color, const Graphics::Font *font = 0); + void drawString(const String &str, int x, int y, int w, OverlayColor color, Graphics::TextAlignment align = Graphics::kTextAlignLeft, int deltax = 0, bool useEllipsis = true); + int getStringWidth(const String &str); int getCharWidth(byte c); - void drawString(const String &str, int x, int y, int w, OverlayColor color, Graphics::TextAlignment align = Graphics::kTextAlignLeft, int deltax = 0, bool useEllipsis = true); void drawBitmap(uint32 *bitmap, int x, int y, OverlayColor color, int h = 8); |
