aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/gui_lol.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2009-09-30 21:46:00 +0000
committerFlorian Kagerer2009-09-30 21:46:00 +0000
commit598056ead0bfff5bf6b08de50cc19e159f91d35a (patch)
treec92e08844b04c19258151379c4e49e182e793e55 /engines/kyra/gui_lol.cpp
parentaa368806d9a69a9a21c44322ed2fbc8ceef20af1 (diff)
downloadscummvm-rg350-598056ead0bfff5bf6b08de50cc19e159f91d35a.tar.gz
scummvm-rg350-598056ead0bfff5bf6b08de50cc19e159f91d35a.tar.bz2
scummvm-rg350-598056ead0bfff5bf6b08de50cc19e159f91d35a.zip
LOL/PC-98: - fixed TIM dialogue button text colors
- fixed menu text alignment svn-id: r44501
Diffstat (limited to 'engines/kyra/gui_lol.cpp')
-rw-r--r--engines/kyra/gui_lol.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index e98f2a6049..e958302d96 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -2324,6 +2324,10 @@ int GUI_LoL::runMenu(Menu &menu) {
// a menu has scroll buttons or slider bars.
uint8 hasSpecialButtons = 0;
+ Screen::FontId of;
+ if (_vm->gameFlags().use16ColorMode)
+ of = _screen->setFont(Screen::FID_SJIS_FNT);
+
while (_displayMenu) {
_vm->_mouseX = _vm->_mouseY = 0;
@@ -2481,6 +2485,7 @@ int GUI_LoL::runMenu(Menu &menu) {
textCursorTimer = 0;
textCursorStatus = 0;
+ Screen::FontId f = _screen->setFont(Screen::FID_9_FNT);
fC = _screen->getTextWidth(_saveDescription);
while (fC >= fW) {
_saveDescription[strlen(_saveDescription) - 1] = 0;
@@ -2488,6 +2493,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->setCurPage(pg);
}
@@ -2497,11 +2503,13 @@ int GUI_LoL::runMenu(Menu &menu) {
if (_currentMenu == &_savenameMenu) {
if (textCursorTimer <= _vm->_system->getMillis()) {
+ Screen::FontId f = _screen->setFont(Screen::FID_9_FNT);
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->updateScreen();
+ f = _screen->setFont(f);
}
}
@@ -2527,6 +2535,9 @@ int GUI_LoL::runMenu(Menu &menu) {
_newMenu = 0;
}
+ if (_vm->gameFlags().use16ColorMode)
+ _screen->setFont(of);
+
return _menuResult;
}
@@ -2591,13 +2602,7 @@ void GUI_LoL::setupSavegameNames(Menu &menu, int num) {
}
void GUI_LoL::printMenuText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 flags, Screen::FontId font) {
- if (_vm->gameFlags().use16ColorMode) {
- Screen::FontId of = _screen->setFont(Screen::FID_SJIS_FNT);
- _screen->fprintString("%s", x, y, c0, c1, flags & 3, str);
- _screen->setFont(of);
- } else {
- _screen->fprintString("%s", x, y, c0, c1, flags, str);
- }
+ _screen->fprintString("%s", x, y, c0, c1, _vm->gameFlags().use16ColorMode ? (flags & 3) : flags , str);
}
int GUI_LoL::getMenuCenterStringX(const char *str, int x1, int x2) {