diff options
author | Eugene Sandulenko | 2019-10-04 19:08:58 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-10-04 19:10:03 +0200 |
commit | 93e8109cdfd37a5e5cc55eeba4d0e9aa9dcefca2 (patch) | |
tree | 8916f5221c4a2145084af2f0ab67a8142fc11d43 /graphics/macgui/macwindow.cpp | |
parent | f7a19617d2a06ea50268e96e570daa72bba7eb93 (diff) | |
download | scummvm-rg350-93e8109cdfd37a5e5cc55eeba4d0e9aa9dcefca2.tar.gz scummvm-rg350-93e8109cdfd37a5e5cc55eeba4d0e9aa9dcefca2.tar.bz2 scummvm-rg350-93e8109cdfd37a5e5cc55eeba4d0e9aa9dcefca2.zip |
GRAPHICS: MACGUI: Add possibility to pass borders as a surface
Diffstat (limited to 'graphics/macgui/macwindow.cpp')
-rw-r--r-- | graphics/macgui/macwindow.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/graphics/macgui/macwindow.cpp b/graphics/macgui/macwindow.cpp index f41378bd9e..e100820b9e 100644 --- a/graphics/macgui/macwindow.cpp +++ b/graphics/macgui/macwindow.cpp @@ -336,6 +336,14 @@ void MacWindow::loadBorder(Common::SeekableReadStream &file, bool active, int lo surface->create(source->w, source->h, surface->getSupportedPixelFormat()); surface->copyFrom(*source); + + source->free(); + delete source; + + setBorder(surface, active, lo, ro, to, bo); +} + +void MacWindow::setBorder(Graphics::TransparentSurface *surface, bool active, int lo, int ro, int to, int bo) { surface->applyColorKey(255, 0, 255, false); if (active) @@ -350,8 +358,6 @@ void MacWindow::loadBorder(Common::SeekableReadStream &file, bool active, int lo } updateInnerDims(); - source->free(); - delete source; } void MacWindow::setCloseable(bool closeable) { |