diff options
Diffstat (limited to 'engines/kyra/gui_lol.cpp')
-rw-r--r-- | engines/kyra/gui_lol.cpp | 36 |
1 files changed, 28 insertions, 8 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) |