- DrawText(gfx.sx + x, gfx.sy + y, buffer, font_nr);
+ DrawText(gfx.sx + (gfx.sxsize - getTextWidth(buffer, font_nr)) / 2,
+ gfx.sy + y, buffer, font_nr);
+}
+
+void DrawTextS(int x, int y, int font_nr, char *text)
+{
+ DrawText(gfx.sx + x, gfx.sy + y, text, font_nr);
+}
+
+void DrawTextSCentered(int y, int font_nr, char *text)
+{
+ DrawText(gfx.sx + (gfx.sxsize - getTextWidth(text, font_nr)) / 2,
+ gfx.sy + y, text, font_nr);