GRAPHICS: MACGUI: Add possibility to pass borders as a surface

This commit is contained in:
Eugene Sandulenko
2019-10-04 19:10:03 +02:00
parent f7a19617d2
commit 93e8109cdf
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -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) {
+1 -1
View File
@@ -277,7 +277,7 @@ public:
* @param bo Width of the bottom side of the border, in pixels.
*/
void loadBorder(Common::SeekableReadStream &file, bool active, int lo = -1, int ro = -1, int to = -1, int bo = -1);
//void setBorder(TransparentSurface &border, bool active);
void setBorder(TransparentSurface *border, bool active, int lo = -1, int ro = -1, int to = -1, int bo = -1);
/**
* Indicate whether the window can be closed (false by default).