mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
GRAPHICS: MACGUI: load win95scrollbar border as default when enable win95 mode
This commit is contained in:
parent
df895359cc
commit
c317ca1900
@ -78,6 +78,13 @@ MacTextWindow::MacTextWindow(MacWindowManager *wm, const MacFont *font, int fgco
|
||||
|
||||
if (cursorHandler)
|
||||
g_system->getTimerManager()->installTimerProc(&cursorTimerHandler, 200000, this, "textWindowCursor");
|
||||
|
||||
if (_wm->_mode & kWMModeWin95) {
|
||||
// in win95 mode, we set scrollbar as default
|
||||
_hasScrollBar = true;
|
||||
loadWin95Border("Win95BorderScrollbar.bmp", kWindowBorderScrollbar | kWindowBorderActive);
|
||||
loadWin95Border("Win95BorderScrollbar.bmp",kWindowBorderScrollbar);
|
||||
}
|
||||
}
|
||||
|
||||
void MacTextWindow::resize(int w, int h, bool inner) {
|
||||
|
@ -514,6 +514,22 @@ void MacWindow::setBorderType(int borderType) {
|
||||
}
|
||||
}
|
||||
|
||||
void MacWindow::loadWin95Border(const Common::String &filename, uint32 flags) {
|
||||
Common::SeekableReadStream *stream = _wm->getFile(filename);
|
||||
if (stream) {
|
||||
Graphics::BorderOffsets offsets;
|
||||
offsets.top = 1;
|
||||
offsets.bottom = 1;
|
||||
offsets.left = 1;
|
||||
offsets.right = 17;
|
||||
offsets.lowerScrollHeight = 15;
|
||||
offsets.upperScrollHeight = 17;
|
||||
offsets.titlePos = 0;
|
||||
loadBorder(*stream, flags, offsets);
|
||||
delete stream;
|
||||
}
|
||||
}
|
||||
|
||||
void MacWindow::addDirtyRect(const Common::Rect &r) {
|
||||
if (!r.isValidRect())
|
||||
return;
|
||||
|
@ -304,6 +304,7 @@ public:
|
||||
void loadBorder(Common::SeekableReadStream &file, uint32 flags, int lo = -1, int ro = -1, int to = -1, int bo = -1);
|
||||
void loadBorder(Common::SeekableReadStream &file, uint32 flags, BorderOffsets offsets);
|
||||
void disableBorder();
|
||||
void loadWin95Border(const Common::String &filename, uint32 flags);
|
||||
/**
|
||||
* we better set this before we load the border
|
||||
* @param scrollbar state
|
||||
|
Loading…
Reference in New Issue
Block a user