X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=lib%2Fvideo%2Fdrawing_context.h;h=c52e40f759b52fe99f7037ad0587626fe24d522d;hb=ca65a4babe2341f4c9b8952cfd516df8d74575e4;hp=46742344bf75c11d599ee087a518549c1070b5e7;hpb=c5cbd36c2e01d8c807c8c931ca44fb7c1b48ad18;p=supertux.git diff --git a/lib/video/drawing_context.h b/lib/video/drawing_context.h index 46742344b..c52e40f75 100644 --- a/lib/video/drawing_context.h +++ b/lib/video/drawing_context.h @@ -67,10 +67,10 @@ namespace SuperTux Uint32 drawing_effect = NONE_EFFECT); /// Draws a text. void draw_text(Font* font, const std::string& text, const Vector& position, - int layer, Uint32 drawing_effect = NONE_EFFECT); + int layer, Uint32 drawing_effect = NONE_EFFECT, int alpha = 255); /// Draws aligned text. void draw_text_center(Font* font, const std::string& text, - const Vector& position, int layer, Uint32 drawing_effect = NONE_EFFECT); + const Vector& position, int layer, Uint32 drawing_effect = NONE_EFFECT, int alpha = 255); /// Draws a color gradient onto the whole screen */ void draw_gradient(Color from, Color to, int layer); /// Fills a rectangle. @@ -129,6 +129,8 @@ namespace SuperTux { Font* font; std::string text; + bool center; + int alpha; }; struct GradientRequest @@ -161,6 +163,7 @@ namespace SuperTux void draw_surface_part(DrawingRequest& request); void draw_text(DrawingRequest& request); + void draw_text_center(DrawingRequest& request); void draw_gradient(DrawingRequest& request); void draw_filled_rect(DrawingRequest& request);