diff --git a/src/emucore/FBSurface.cxx b/src/emucore/FBSurface.cxx index c489fc703..4b882346f 100644 --- a/src/emucore/FBSurface.cxx +++ b/src/emucore/FBSurface.cxx @@ -329,7 +329,7 @@ bool FBSurface::isWhiteSpace(const char s) const int FBSurface::drawString(const GUI::Font& font, const string& s, int x, int y, int w, int h, ColorId color, TextAlign align, - int deltax, bool useEllipsis, ColorId shadowColor) + bool useEllipsis, ColorId shadowColor) { int lines = 1; @@ -355,13 +355,13 @@ int FBSurface::drawString(const GUI::Font& font, const string& s, //str += inStr[i]; } wrapString(inStr, i, leftStr, rightStr); - drawString(font, leftStr, x, y, w, color, align, deltax, false, shadowColor); + drawString(font, leftStr, x, y, w, color, align, false, shadowColor); h -= font.getFontHeight(); y += font.getFontHeight(); inStr = rightStr; lines++; } - drawString(font, inStr, x, y, w, color, align, deltax, useEllipsis, shadowColor); + drawString(font, inStr, x, y, w, color, align, useEllipsis, shadowColor); #endif return lines; } @@ -370,7 +370,7 @@ int FBSurface::drawString(const GUI::Font& font, const string& s, void FBSurface::drawString(const GUI::Font& font, const string& s, int x, int y, int w, ColorId color, TextAlign align, - int deltax, bool useEllipsis, ColorId shadowColor) + bool useEllipsis, ColorId shadowColor) { #ifdef GUI_SUPPORT const string ELLIPSIS = "\x1d"; // "..." @@ -410,7 +410,6 @@ void FBSurface::drawString(const GUI::Font& font, const string& s, else if(align == TextAlign::Right) x = x + w - width; - x += deltax; for(i = 0; i < str.size(); ++i) { w = font.getCharWidth(str[i]); diff --git a/src/emucore/FBSurface.hxx b/src/emucore/FBSurface.hxx index 48632404d..4be99dc42 100644 --- a/src/emucore/FBSurface.hxx +++ b/src/emucore/FBSurface.hxx @@ -218,7 +218,6 @@ class FBSurface @param h The height of the string area (for multi line strings) @param color The color of the text @param align The alignment of the text in the string width area - @param deltax FIXME @param useEllipsis Whether to use '...' when the string is too long @return Number of lines drawn */ @@ -226,7 +225,7 @@ class FBSurface virtual int drawString( const GUI::Font& font, const string& s, int x, int y, int w, int h, ColorId color, TextAlign align = TextAlign::Left, - int deltax = 0, bool useEllipsis = true, ColorId shadowColor = kNone); + bool useEllipsis = true, ColorId shadowColor = kNone); /** This method should be called to draw the specified string. @@ -238,13 +237,12 @@ class FBSurface @param w The width of the string area @param color The color of the text @param align The alignment of the text in the string width area - @param deltax FIXME @param useEllipsis Whether to use '...' when the string is too long */ virtual void drawString( const GUI::Font& font, const string& s, int x, int y, int w, ColorId color, TextAlign align = TextAlign::Left, - int deltax = 0, bool useEllipsis = true, ColorId shadowColor = kNone); + bool useEllipsis = true, ColorId shadowColor = kNone); ////////////////////////////////////////////////////////////////////////// // Note: The following methods are FBSurface-specific, and must be diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 97af29fcf..2a53d2c8f 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -600,7 +600,7 @@ void FrameBuffer::drawFrameStats(float framesPerSecond) << info.DisplayFormat; myStatsMsg.surface->drawString(f, ss.str(), xPos, yPos, - myStatsMsg.w, color, TextAlign::Left, 0, true, kBGColor); + myStatsMsg.w, color, TextAlign::Left, true, kBGColor); yPos += dy; ss.str(""); @@ -615,7 +615,7 @@ void FrameBuffer::drawFrameStats(float framesPerSecond) << "% speed"; myStatsMsg.surface->drawString(f, ss.str(), xPos, yPos, - myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor); + myStatsMsg.w, myStatsMsg.color, TextAlign::Left, true, kBGColor); yPos += dy; ss.str(""); @@ -624,7 +624,7 @@ void FrameBuffer::drawFrameStats(float framesPerSecond) if (myOSystem.settings().getBool("dev.settings")) ss << "| Developer"; myStatsMsg.surface->drawString(f, ss.str(), xPos, yPos, - myStatsMsg.w, myStatsMsg.color, TextAlign::Left, 0, true, kBGColor); + myStatsMsg.w, myStatsMsg.color, TextAlign::Left, true, kBGColor); myStatsMsg.surface->setDstPos(myImageRect.x() + 10, myImageRect.y() + 8); myStatsMsg.surface->setDstSize(myStatsMsg.w * hidpiScaleFactor(), diff --git a/src/gui/Widget.cxx b/src/gui/Widget.cxx index ed6ba2f02..132bbd7b9 100644 --- a/src/gui/Widget.cxx +++ b/src/gui/Widget.cxx @@ -344,7 +344,7 @@ void StaticTextWidget::drawWidget(bool hilite) FBSurface& s = _boss->dialog().surface(); bool onTop = _boss->dialog().isOnTop(); s.drawString(_font, _label, _x, _y, _w, - isEnabled() && onTop ? _textcolor : kColor, _align, 0, true, _shadowcolor); + isEnabled() && onTop ? _textcolor : kColor, _align, true, _shadowcolor); setDirty(); }