mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
GRAPHICS: MACGUI: Add disableBorder() to MacWindow
This commit is contained in:
parent
54251d658f
commit
8ae73ce263
@ -68,6 +68,28 @@ MacWindow::MacWindow(int id, bool scrollable, bool resizable, bool editable, Mac
|
||||
MacWindow::~MacWindow() {
|
||||
}
|
||||
|
||||
static const byte noborderData[3][3] = {
|
||||
{ 0, 1, 0 },
|
||||
{ 1, 0, 1 },
|
||||
{ 0, 1, 0 },
|
||||
};
|
||||
|
||||
void MacWindow::disableBorder() {
|
||||
Graphics::TransparentSurface *noborder = new Graphics::TransparentSurface();
|
||||
noborder->create(3, 3, noborder->getSupportedPixelFormat());
|
||||
uint32 colorBlack = noborder->getSupportedPixelFormat().RGBToColor(0, 0, 0);
|
||||
uint32 colorPink = noborder->getSupportedPixelFormat().RGBToColor(255, 0, 255);
|
||||
|
||||
for (int y = 0; y < 3; y++)
|
||||
for (int x = 0; x < 3; x++)
|
||||
*((uint32 *)noborder->getBasePtr(x, y)) = noborderData[y][x] ? colorBlack : colorPink;
|
||||
|
||||
setBorder(noborder, true);
|
||||
|
||||
Graphics::TransparentSurface *noborder2 = new Graphics::TransparentSurface(*noborder, true);
|
||||
setBorder(noborder2, false);
|
||||
}
|
||||
|
||||
const Font *MacWindow::getTitleFont() {
|
||||
return _wm->_fontMan->getFont(Graphics::MacFont(kMacFontChicago, 12));
|
||||
}
|
||||
|
@ -266,6 +266,7 @@ public:
|
||||
*/
|
||||
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, int lo = -1, int ro = -1, int to = -1, int bo = -1);
|
||||
void disableBorder();
|
||||
|
||||
/**
|
||||
* Indicate whether the window can be closed (false by default).
|
||||
|
Loading…
x
Reference in New Issue
Block a user