X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=lib%2Fvideo%2Fdrawing_context.cpp;h=889b86377ae443037d4ef2c7eeb92757401a63d8;hb=c6c8b57b862c835acfcfa0ae6856fe7c2e5204fb;hp=c7718c5f741b59f943e5fd07bb5b2fcddfb42d23;hpb=8a2c96eedfa91dc2f791c90f85697d3a3fe2a268;p=supertux.git diff --git a/lib/video/drawing_context.cpp b/lib/video/drawing_context.cpp index c7718c5f7..889b86377 100644 --- a/lib/video/drawing_context.cpp +++ b/lib/video/drawing_context.cpp @@ -104,6 +104,14 @@ DrawingContext::draw_text(Font* font, const std::string& text, } void +DrawingContext::draw_center_text(Font* font, const std::string& text, + const Vector& position, int layer, Uint32 drawing_effect) +{ +draw_text(font, text, Vector(position.x + screen->w/2, position.y), + CENTER_ALLIGN, layer, drawing_effect); +} + +void DrawingContext::draw_gradient(Color top, Color bottom, int layer) { DrawingRequest request;