diff options
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/gui_lol.cpp | 36 | ||||
-rw-r--r-- | engines/kyra/screen_lol.cpp | 2 |
2 files changed, 29 insertions, 9 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp index d0b05bca66..d324a91ea4 100644 --- a/engines/kyra/gui_lol.cpp +++ b/engines/kyra/gui_lol.cpp @@ -2437,10 +2437,14 @@ int GUI_LoL::runMenu(Menu &menu) { int my = d->sy - 1; int mw = (d->w << 3) + 1; int mh = d->h + 1; - if (_vm->gameFlags().use16ColorMode) - _screen->drawShadedBox(mx, my, mx + mw, my + mh, 0xdd, 0xff); - else + if (_vm->gameFlags().use16ColorMode) { + _screen->drawShadedBox(mx, my, mx + mw + 1, my + mh + 1, 0xdd, 0xff); + _screen->drawLine(true, mx + mw + 1, my, mh + 1, 0xcc); + _screen->drawLine(false, mx, my + mh + 1, mw + 2, 0xcc); + } else { _screen->drawShadedBox(mx, my, mx + mw, my + mh, 227, 223); + } + int pg = _screen->setCurPage(0); _vm->_txt->clearDim(8); textCursorTimer = 0; @@ -2455,7 +2459,7 @@ int GUI_LoL::runMenu(Menu &menu) { _screen->fprintString("%s", (d->sx << 3), d->sy + 2, d->unk8, d->unkA, 0, _saveDescription); f = _screen->setFont(f); - _screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - 1, d->unk8, 0); + _screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - (_vm->gameFlags().use16ColorMode ? 2 : 1), d->unk8, 0); _screen->setCurPage(pg); } @@ -2468,17 +2472,33 @@ int GUI_LoL::runMenu(Menu &menu) { fC = _screen->getTextWidth(_saveDescription); textCursorStatus ^= 1; textCursorTimer = _vm->_system->getMillis() + 20 * _vm->_tickLength; - _screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - 1, textCursorStatus ? d->unk8 : d->unkA, 0); + _screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - (_vm->gameFlags().use16ColorMode ? 2 : 1), textCursorStatus ? d->unk8 : d->unkA, 0); _screen->updateScreen(); f = _screen->setFont(f); } } if (getInput()) { - if (!_newMenu) - _newMenu = (_currentMenu != &_audioOptions) ? _currentMenu : 0; - else + if (!_newMenu) { + if (_currentMenu == &_savenameMenu) { + Screen::FontId f = _screen->setFont(Screen::FID_9_FNT); + _screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - (_vm->gameFlags().use16ColorMode ? 2 : 1), d->unkA, 0); + fC = _screen->getTextWidth(_saveDescription); + while (fC >= fW) { + _saveDescription[strlen(_saveDescription) - 1] = 0; + fC = _screen->getTextWidth(_saveDescription); + } + _screen->fprintString("%s", (d->sx << 3), d->sy + 2, d->unk8, d->unkA, 0, _saveDescription); + _screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - (_vm->gameFlags().use16ColorMode ? 2 : 1), textCursorStatus ? d->unk8 : d->unkA, 0); + f = _screen->setFont(f); + textCursorTimer = 0; + textCursorStatus = 0; + } else { + _newMenu = (_currentMenu != &_audioOptions) ? _currentMenu : 0; + } + } else { _lastMenu = _menuResult == -1 ? _lastMenu : _currentMenu; + } } if (!_menuResult) diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp index 4d8e4fb78c..345c15b784 100644 --- a/engines/kyra/screen_lol.cpp +++ b/engines/kyra/screen_lol.cpp @@ -161,7 +161,7 @@ void Screen_LoL::drawShadedBox(int x1, int y1, int x2, int y2, int color1, int c drawClippedLine(x1 + 1, y2 - 1, x2, y2 - 1, color2); drawClippedLine(x1, y2, x2, y2, color2); - if (_use16ColorMode) + if (_use16ColorMode && color1 > color2) drawBox(x1, y1, x2, y2, 0); showMouse(); |