rnd-20070315-2-src
[rocksndiamonds.git] / src / libgame / text.c
index 6446ffe21d9bf154ff00dc39351d647eeaf87148..c8cc667dd98db66e2ce72fbe702965c1bb3c8051 100644 (file)
@@ -251,6 +251,11 @@ void DrawTextSCentered(int y, int font_nr, char *text)
           gfx.sy + y, text, font_nr);
 }
 
+void DrawTextCentered(int y, int font_nr, char *text)
+{
+  DrawText((gfx.sxsize - getTextWidth(text, font_nr)) / 2, y, text, font_nr);
+}
+
 void DrawTextSAligned(int x, int y, char *text, int font_nr, int align)
 {
   DrawText(gfx.sx + ALIGNED_XPOS(x, getTextWidth(text, font_nr), align),