From c0f82d351894df16e23690b4361e66bed0fb6f84 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 12 Nov 2008 14:30:16 +0000 Subject: Renamed Graphics::TextAlignment -> Graphics::TextAlign and merged it with GUI::ThemeEngine::TextAlignVertical svn-id: r35023 --- graphics/VectorRenderer.h | 2 +- graphics/VectorRendererSpec.cpp | 4 ++-- graphics/VectorRendererSpec.h | 2 +- graphics/font.cpp | 2 +- graphics/font.h | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'graphics') diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index 4ccd6845b9..f0c319fe76 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -507,7 +507,7 @@ public: * method. */ virtual void drawString(const Graphics::Font *font, const Common::String &text, - const Common::Rect &area, GUI::ThemeEngine::TextAlign alignH, + const Common::Rect &area, Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool useEllipsis) = 0; /** diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 675acd7ad3..2924e2b1b7 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -449,7 +449,7 @@ colorFill(PixelType *first, PixelType *last, PixelType color) { template void VectorRendererSpec:: drawString(const Graphics::Font *font, const Common::String &text, const Common::Rect &area, - GUI::ThemeEngine::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool ellipsis) { + Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool ellipsis) { int offset = area.top; @@ -466,7 +466,7 @@ drawString(const Graphics::Font *font, const Common::String &text, const Common: } } - font->drawString(_activeSurface, text, area.left, offset, area.width(), _fgColor, (Graphics::TextAlignment)alignH, deltax, ellipsis); + font->drawString(_activeSurface, text, area.left, offset, area.width(), _fgColor, alignH, deltax, ellipsis); } /** LINES **/ diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h index 5b4ebf38e7..fdeb9f9989 100644 --- a/graphics/VectorRendererSpec.h +++ b/graphics/VectorRendererSpec.h @@ -68,7 +68,7 @@ public: drawBevelSquareAlg(x, y, w, h, bevel, _bevelColor, _fgColor, Base::_fillMode != kFillDisabled); } void drawString(const Graphics::Font *font, const Common::String &text, - const Common::Rect &area, GUI::ThemeEngine::TextAlign alignH, + const Common::Rect &area, Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool elipsis); void setFgColor(uint8 r, uint8 g, uint8 b) { _fgColor = RGBToColor(r, g, b); } diff --git a/graphics/font.cpp b/graphics/font.cpp index 3680ad2eb8..bc5353c9c6 100644 --- a/graphics/font.cpp +++ b/graphics/font.cpp @@ -772,7 +772,7 @@ int Font::getStringWidth(const Common::String &str) const { return space; } -void Font::drawString(Surface *dst, const Common::String &s, int x, int y, int w, uint32 color, TextAlignment align, int deltax, bool useEllipsis) const { +void Font::drawString(Surface *dst, const Common::String &s, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const { assert(dst != 0); const int leftX = x, rightX = x + w; uint i; diff --git a/graphics/font.h b/graphics/font.h index 3911e6d32c..5667fcd8f3 100644 --- a/graphics/font.h +++ b/graphics/font.h @@ -34,11 +34,11 @@ class SeekableReadStream; namespace Graphics { -// Text alignment modes for drawString() -enum TextAlignment { - kTextAlignLeft, - kTextAlignCenter, - kTextAlignRight +/** Text alignment modes */ +enum TextAlign { + kTextAlignLeft, //!< Text should be aligned to the left + kTextAlignCenter, //!< Text should be centered + kTextAlignRight //!< Text should be aligned to the right }; /** @@ -57,7 +57,7 @@ public: virtual int getCharWidth(byte chr) const = 0; virtual void drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const = 0; - void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlignment align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const; + void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const; /** * Compute and return the width the string str has when rendered using this font. -- cgit v1.2.3