mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-15 08:39:45 +00:00
GUI: Render ManagedSurface widget with transparency
This commit is contained in:
parent
a299f8b8f7
commit
7fe0073823
@ -1340,6 +1340,21 @@ void ThemeEngine::drawSurface(const Common::Point &p, const Graphics::Surface &s
|
||||
addDirtyRect(dirtyRect);
|
||||
}
|
||||
|
||||
void ThemeEngine::drawSurface(const Common::Point &p, const Graphics::ManagedSurface &surface, bool themeTrans) {
|
||||
if (!ready())
|
||||
return;
|
||||
|
||||
if (_layerToDraw == kDrawLayerBackground)
|
||||
return;
|
||||
|
||||
_vectorRenderer->setClippingRect(_clip);
|
||||
_vectorRenderer->blitManagedSurface(&surface, p);
|
||||
|
||||
Common::Rect dirtyRect = Common::Rect(p.x, p.y, p.x + surface.w, p.y + surface.h);
|
||||
dirtyRect.clip(_clip);
|
||||
addDirtyRect(dirtyRect);
|
||||
}
|
||||
|
||||
void ThemeEngine::drawWidgetBackground(const Common::Rect &r, WidgetBackground background) {
|
||||
if (!ready())
|
||||
return;
|
||||
|
@ -459,6 +459,7 @@ public:
|
||||
WidgetStateInfo buttonState, bool inButton, bool inDropdown, bool rtl = false);
|
||||
|
||||
void drawSurface(const Common::Point &p, const Graphics::Surface &surface, bool themeTrans = false);
|
||||
void drawSurface(const Common::Point &p, const Graphics::ManagedSurface &surface, bool themeTrans = false);
|
||||
|
||||
void drawSlider(const Common::Rect &r, int width, WidgetStateInfo state = kStateEnabled, bool rtl = false);
|
||||
|
||||
|
@ -907,7 +907,7 @@ void GraphicsWidget::setGfxFromTheme(const char *name) {
|
||||
}
|
||||
|
||||
_gfx.free();
|
||||
_gfx.create(_w, _h, g_gui.theme()->getPixelFormat());
|
||||
_gfx.create(_w, _h, *svg->getPixelFormat());
|
||||
svg->render(_gfx, _w, _h);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user