From 6524a8d103c87def348b9560418850cb48d24ce4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 4 Aug 2014 01:12:49 +0200 Subject: GUI: Added transparency to PicWidgets --- graphics/VectorRendererSpec.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'graphics/VectorRendererSpec.cpp') diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 8af6594fd4..9aed3301fa 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -888,11 +888,11 @@ blitKeyBitmap(const Graphics::Surface *source, const Common::Rect &r) { template void VectorRendererSpec:: blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r, GUI::ThemeEngine::AutoScaleMode autoscale, - Graphics::DrawStep::VectorAlignment xAlign, Graphics::DrawStep::VectorAlignment yAlign) { + Graphics::DrawStep::VectorAlignment xAlign, Graphics::DrawStep::VectorAlignment yAlign, int alpha) { if (autoscale == GUI::ThemeEngine::kAutoScaleStretch) { source->blit(*_activeSurface, r.left, r.top, Graphics::FLIP_NONE, - nullptr, TS_ARGB(255, 255, 255, 255), - r.width(), r.height()); + nullptr, TS_ARGB(alpha, 255, 255, 255), + r.width(), r.height()); } else if (autoscale == GUI::ThemeEngine::kAutoScaleFit) { double ratio = (double)r.width() / source->w; double ratio2 = (double)r.height() / source->h; @@ -908,7 +908,7 @@ blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r, GUI offy = (r.height() - (int)(source->h * ratio)) >> 1; source->blit(*_activeSurface, r.left + offx, r.top + offy, Graphics::FLIP_NONE, - nullptr, TS_ARGB(255, 255, 255, 255), + nullptr, TS_ARGB(alpha, 255, 255, 255), (int)(source->w * ratio), (int)(source->h * ratio)); } else if (autoscale == GUI::ThemeEngine::kAutoScaleNinePatch) { -- cgit v1.2.3