From a882a6f46779768f15d38e350781785d975e5007 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 28 Jun 2009 19:57:27 +0000 Subject: GUI: Replaced ThemeParser::_drawFunction hashmap by a static function getDrawingFunctionCallback which maps strings to draw funcs svn-id: r41931 --- graphics/VectorRenderer.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'graphics/VectorRenderer.h') diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index acc2f77357..136a8d55b3 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -37,6 +37,10 @@ namespace Graphics { class VectorRenderer; + +typedef void (VectorRenderer::*DrawingFunctionCallback)(const Common::Rect &, const Graphics::DrawStep &); + + struct DrawStep { struct Color { uint8 r, g, b; @@ -59,7 +63,10 @@ struct DrawStep { kVectorAlignBottom, kVectorAlignTop, kVectorAlignCenter - } xAlign, yAlign; + }; + + VectorAlignment xAlign; + VectorAlignment yAlign; uint8 shadow, stroke, factor, radius, bevel; /**< Misc options... */ @@ -68,7 +75,7 @@ struct DrawStep { uint32 scale; /**< scale of all the coordinates in FIXED POINT with 16 bits mantissa */ - void (VectorRenderer::*drawingCall)(const Common::Rect &, const DrawStep &); /** Pointer to drawing function */ + DrawingFunctionCallback drawingCall; /**< Pointer to drawing function */ Graphics::Surface *blitSrc; }; -- cgit v1.2.3