summaryrefslogtreecommitdiff
path: root/src/gfx_func.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-25 01:10:24 +0000
committerrubidium <rubidium@openttd.org>2009-03-25 01:10:24 +0000
commit3e93f8adda5f23808e66a973b1dce8d7e7c24d0f (patch)
tree6a8fb50166f8edf977cbf51774333b5004a3a679 /src/gfx_func.h
parent4a500bbcdb5c1f3b8bfe8dcc454c2d07b210bf88 (diff)
downloadopenttd-3e93f8adda5f23808e66a973b1dce8d7e7c24d0f.tar.xz
(svn r15844) -Codechange: allow text alignment to be forced so the console and ai debug output don't get swapped (those are untranslateable anyways)
Diffstat (limited to 'src/gfx_func.h')
-rw-r--r--src/gfx_func.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gfx_func.h b/src/gfx_func.h
index 88aebc07b..139056df3 100644
--- a/src/gfx_func.h
+++ b/src/gfx_func.h
@@ -87,10 +87,13 @@ void DrawSprite(SpriteID img, SpriteID pal, int x, int y, const SubSprite *sub =
/** How to align the to-be drawn text. */
enum StringAlignment {
- SA_LEFT, ///< Left align the text
- SA_CENTER, ///< Center the text
- SA_RIGHT, ///< Right align the text
+ SA_LEFT, ///< Left align the text
+ SA_CENTER, ///< Center the text
+ SA_RIGHT, ///< Right align the text
+ SA_MASK = 3, ///< Mask for base alignment
+ SA_FORCE = 4, ///< Force the alignment, i.e. don't swap for RTL languages.
};
+DECLARE_ENUM_AS_BIT_SET(StringAlignment);
int DrawString(int left, int right, int top, const char *str, TextColour colour, StringAlignment align = SA_LEFT, bool underline = false);
int DrawString(int left, int right, int top, StringID str, TextColour colour, StringAlignment align = SA_LEFT, bool underline = false);