X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=lib%2Fvideo%2Fdrawing_context.cpp;h=0019ff5429afbec9a49f618bf915a937e75616d9;hb=ca65a4babe2341f4c9b8952cfd516df8d74575e4;hp=ea1020fec46bb7f9c40106d1ac2f875ea0721ead;hpb=c572ff4247c9107091c2b526721a2befb32f0ed1;p=supertux.git diff --git a/lib/video/drawing_context.cpp b/lib/video/drawing_context.cpp index ea1020fec..0019ff542 100644 --- a/lib/video/drawing_context.cpp +++ b/lib/video/drawing_context.cpp @@ -78,7 +78,7 @@ DrawingContext::draw_surface_part(const Surface* surface, const Vector& source, void DrawingContext::draw_text(Font* font, const std::string& text, - const Vector& position, int layer, Uint32 drawing_effect) + const Vector& position, int layer, Uint32 drawing_effect, int alpha) { DrawingRequest request; @@ -91,6 +91,7 @@ DrawingContext::draw_text(Font* font, const std::string& text, textrequest->font = font; textrequest->text = text; textrequest->center = false; + textrequest->alpha = alpha; request.request_data = textrequest; drawingrequests.push_back(request); @@ -98,7 +99,7 @@ DrawingContext::draw_text(Font* font, const std::string& text, void DrawingContext::draw_text_center(Font* font, const std::string& text, - const Vector& position, int layer, Uint32 drawing_effect) + const Vector& position, int layer, Uint32 drawing_effect, int alpha) { DrawingRequest request; @@ -111,6 +112,7 @@ DrawingContext::draw_text_center(Font* font, const std::string& text, textrequest->font = font; textrequest->text = text; textrequest->center = true; + textrequest->alpha = alpha; request.request_data = textrequest; drawingrequests.push_back(request); @@ -218,9 +220,9 @@ DrawingContext::draw_text(DrawingRequest& request) TextRequest* textrequest = (TextRequest*) request.request_data; if(textrequest->center) - textrequest->font->draw_center(textrequest->text, request.pos, request.drawing_effect); + textrequest->font->draw_center(textrequest->text, request.pos, request.drawing_effect, textrequest->alpha); else - textrequest->font->draw(textrequest->text, request.pos, request.drawing_effect); + textrequest->font->draw(textrequest->text, request.pos, request.drawing_effect, textrequest->alpha); delete textrequest; }