diff options
-rw-r--r-- | engines/scumm/dialogs.cpp | 33 | ||||
-rw-r--r-- | gui/ThemeEval.cpp | 10 | ||||
-rw-r--r-- | gui/ThemeEval.h | 2 | ||||
-rw-r--r-- | gui/ThemeRenderer.cpp | 8 | ||||
-rw-r--r-- | gui/themes/scummodern.stx | 27 | ||||
-rw-r--r-- | gui/themes/scummodern.zip | bin | 30075 -> 109834 bytes |
6 files changed, 55 insertions, 25 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index bdb7118f56..559ad6e69e 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -318,7 +318,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da } void SaveLoadChooser::reflowLayout() { - if (g_gui.evaluator()->getVar("scummsaveload_extinfo.visible") == 1) { + if (g_gui.xmlEval()->getVar("ScummSaveLoad.ExtInfo.Visible", 1) == 1) { int16 x, y; uint16 w, h; @@ -644,16 +644,16 @@ enum { }; HelpDialog::HelpDialog(const GameSettings &game) - : ScummDialog("scummhelp"), _game(game) { - _title = new StaticTextWidget(this, "scummhelp_title", ""); + : ScummDialog("ScummHelp"), _game(game) { + _title = new StaticTextWidget(this, "ScummHelp.Title", ""); _page = 1; _numPages = ScummHelp::numPages(_game.id); - _prevButton = new GUI::ButtonWidget(this, "scummhelp_prev", "Previous", kPrevCmd, 'P'); - _nextButton = new GUI::ButtonWidget(this, "scummhelp_next", "Next", kNextCmd, 'N'); - new GUI::ButtonWidget(this, "scummhelp_close", "Close", kCloseCmd, 'C'); + _prevButton = new GUI::ButtonWidget(this, "ScummHelp.Prev", "Previous", kPrevCmd, 'P'); + _nextButton = new GUI::ButtonWidget(this, "ScummHelp.Next", "Next", kNextCmd, 'N'); + new GUI::ButtonWidget(this, "ScummHelp.Close", "Close", kCloseCmd, 'C'); _prevButton->clearFlags(WIDGET_ENABLED); // Dummy entries @@ -670,19 +670,18 @@ void HelpDialog::reflowLayout() { _drawingHints &= ~GUI::THEME_HINT_SPECIAL_COLOR; int lineHeight = g_gui.getFontHeight(); - - int keyX = g_gui.evaluator()->getVar("scummhelp_key.x"); - int keyYoff = g_gui.evaluator()->getVar("scummhelp_key.yoffset"); - int keyW = g_gui.evaluator()->getVar("scummhelp_key.w"); - int keyH = g_gui.evaluator()->getVar("scummhelp_key.h"); - int dscX = g_gui.evaluator()->getVar("scummhelp_dsc.x"); - int dscYoff = g_gui.evaluator()->getVar("scummhelp_dsc.yoffset"); - int dscW = g_gui.evaluator()->getVar("scummhelp_dsc.w"); - int dscH = g_gui.evaluator()->getVar("scummhelp_dsc.h"); + int16 x, y; + uint16 w, h; + + g_gui.xmlEval()->getWidgetData("ScummHelp.HelpText", x, y, w, h); + + int keyW = w * 20 / 100; + int dscX = x + keyW; + int dscW = w * 80 / 100; for (int i = 0; i < HELP_NUM_LINES; i++) { - _key[i]->resize(keyX, keyYoff + lineHeight * (i + 2), keyW, keyH); - _dsc[i]->resize(dscX, dscYoff + lineHeight * (i + 2), dscW, dscH); + _key[i]->resize(x, y + lineHeight * i, keyW, lineHeight + 2); + _dsc[i]->resize(dscX, y + lineHeight * i, dscW, lineHeight + 2); } displayKeyBindings(); diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp index ec866cc626..ab9e726b75 100644 --- a/gui/ThemeEval.cpp +++ b/gui/ThemeEval.cpp @@ -124,8 +124,11 @@ void ThemeLayoutVertical::reflowLayout() { if (autoWidget != -1 && autoWidget != (int)i) { _children[autoWidget]->setHeight(_children[autoWidget]->getHeight() - (_children[i]->getHeight() + _spacing)); - for (int j = autoWidget - 1; j >= 0; --j) + + if (_reverse) for (int j = autoWidget - 1; j >= 0; --j) _children[j]->setY(-(_children[i]->getHeight() + _spacing)); + else + _children[i]->setY(-2 * (_children[i]->getHeight() + _spacing)); } else { _h += _children[i]->getHeight() + _spacing; } @@ -172,8 +175,11 @@ void ThemeLayoutHorizontal::reflowLayout() { if (autoWidget != -1 && autoWidget != (int)i) { _children[autoWidget]->setWidth(_children[autoWidget]->getWidth() - (_children[i]->getWidth() + _spacing)); - for (int j = autoWidget - 1; j >= 0; --j) + + if (_reverse) for (int j = autoWidget - 1; j >= 0; --j) _children[j]->setX(-(_children[i]->getWidth() + _spacing)); + else + _children[i]->setX(-2 * (_children[i]->getWidth() + _spacing)); } else { _w += _children[i]->getWidth() + _spacing; } diff --git a/gui/ThemeEval.h b/gui/ThemeEval.h index eecd2db3ee..aaab4cb2bf 100644 --- a/gui/ThemeEval.h +++ b/gui/ThemeEval.h @@ -377,7 +377,7 @@ public: } void debugDraw(Graphics::Surface *screen, const Graphics::Font *font) { - _layouts["Dialog.Browser"]->debugDraw(screen, font); + _layouts["Dialog.Launcher"]->debugDraw(screen, font); // _layouts["Dialog.GameOptions_Graphics"]->debugDraw(screen, font); } diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp index 73043063a5..1c3a1af8cf 100644 --- a/gui/ThemeRenderer.cpp +++ b/gui/ThemeRenderer.cpp @@ -866,11 +866,11 @@ void ThemeRenderer::updateScreen() { _textQueue.clear(); } - renderDirtyScreen(); +// renderDirtyScreen(); - // _vectorRenderer->fillSurface(); - // themeEval()->debugDraw(_screen, _font); - // _vectorRenderer->copyWholeFrame(_system); + _vectorRenderer->fillSurface(); + themeEval()->debugDraw(_screen, _font); + _vectorRenderer->copyWholeFrame(_system); } void ThemeRenderer::renderDirtyScreen() { diff --git a/gui/themes/scummodern.stx b/gui/themes/scummodern.stx index 965008a6e8..d3df1865ca 100644 --- a/gui/themes/scummodern.stx +++ b/gui/themes/scummodern.stx @@ -483,6 +483,8 @@ <def var = 'ShowLauncherLogo' value = '1'/> <def resolution = '320xY' var = 'ShowLauncherLogo' value = '0'/> + + <def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/> <widget name = 'OptionsLabel' size = '110, Globals.Line.Height' @@ -582,7 +584,7 @@ <widget name = 'Version' height = 'Globals.Line.Height' /> - <widget name = 'GameList' width = '304' height = '120'/> + <widget name = 'GameList'/> <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6'> <widget name = 'AddGameButton' width = '95' @@ -1050,4 +1052,27 @@ </layout> </layout> </dialog> + + <dialog name = 'ScummHelp' overlays = 'screen_center'> + <layout type = 'vertical' padding = '8, 8, 8, 8' direction = 'bottom2top'> + <layout type = 'horizontal' padding = '0, 0, 16, 0'> + <widget name = 'Prev' + type = 'Button' + /> + <widget name = 'Next' + type = 'Button' + /> + <space size = '32'/> + <widget name = 'Close' + type = 'Button' + /> + </layout> + <widget name = 'HelpText' + height = '220' + /> + <widget name = 'Title' + height = 'Globals.Line.Height' + /> + </layout> + </dialog> </layout_info>
\ No newline at end of file diff --git a/gui/themes/scummodern.zip b/gui/themes/scummodern.zip Binary files differindex 2a6f268eb9..e9280529f1 100644 --- a/gui/themes/scummodern.zip +++ b/gui/themes/scummodern.zip |