- rest of 64bit fix.. missed some vars
[supertux.git] / lib / video / drawing_context.h
index a927b67..6c7e774 100644 (file)
@@ -68,7 +68,14 @@ namespace SuperTux
       /// Draws a text.
       void draw_text(Font* font, const std::string& text, const Vector& position,
                      int allignment, int layer,
-                     Uint32 drawing_effect = NONE_EFFECT, int alpha = 255);
+                     Uint32 drawing_effect = NONE_EFFECT);
+
+      /// Draws text on screen center (feed Vector.x with a 0).
+      /// This is the same as draw_text() with a screen->w/2 position and
+      /// allignment set to LEFT_ALLIGN
+      void draw_center_text(Font* font, const std::string& text,
+                           const Vector& position, int layer,
+                           Uint32 drawing_effect = NONE_EFFECT);
       /// Draws a color gradient onto the whole screen */
       void draw_gradient(Color from, Color to, int layer);
       /// Fills a rectangle.
@@ -93,6 +100,8 @@ namespace SuperTux
       void set_drawing_effect(int effect);
       /// apply that zoom in the next draws */
       void set_zooming(float zoom);
+      /// apply that alpha in the next draws */
+      void set_alpha(int alpha);
 
     private:
       class Transform
@@ -107,6 +116,7 @@ namespace SuperTux
 
           Uint32 draw_effect;
           float zoom;
+          int alpha;
         };
 
       /// the transform stack
@@ -130,7 +140,6 @@ namespace SuperTux
           Font* font;
           std::string text;
           int allignment;
-          int alpha;
         };
 
       struct GradientRequest
@@ -150,6 +159,7 @@ namespace SuperTux
           int layer;
           Uint32 drawing_effect;
           float zoom;
+          int alpha;
 
           RequestType type;
           Vector pos;