mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 05:34:27 +00:00
Allow char drawing with a custom font
svn-id: r14624
This commit is contained in:
parent
e27f2c5592
commit
0f142572f7
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user