summaryrefslogtreecommitdiff
path: root/src/gfx_func.h
diff options
context:
space:
mode:
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);