From 784c1114cc07363359d1e8ae7d12152157b7983b Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Fri, 15 Aug 2008 16:44:44 +0000 Subject: Deprecated support for "direction" layout keys. svn-id: r33904 --- engines/scumm/dialogs.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 6a4ab4bd3c..e1fe3cfeed 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -645,6 +645,7 @@ HelpDialog::HelpDialog(const GameSettings &game) _title = new StaticTextWidget(this, "ScummHelp.Title", ""); _page = 1; + _backgroundType = GUI::Theme::kDialogBackgroundDefault; _numPages = ScummHelp::numPages(_game.id); @@ -655,8 +656,8 @@ HelpDialog::HelpDialog(const GameSettings &game) // Dummy entries for (int i = 0; i < HELP_NUM_LINES; i++) { - _key[i] = new StaticTextWidget(this, 0, 0, 10, 10, "", kTextAlignLeft); - _dsc[i] = new StaticTextWidget(this, 0, 0, 10, 10, "", kTextAlignLeft); + _key[i] = new StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignRight); + _dsc[i] = new StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignLeft); } } @@ -671,12 +672,14 @@ void HelpDialog::reflowLayout() { g_gui.xmlEval()->getWidgetData("ScummHelp.HelpText", x, y, w, h); int keyW = w * 20 / 100; - int dscX = x + keyW; + int dscX = x + keyW + 32; int dscW = w * 80 / 100; + + int xoff = (_w >> 1) - (w >> 1); for (int i = 0; i < HELP_NUM_LINES; i++) { - _key[i]->resize(x, y + lineHeight * i, keyW, lineHeight + 2); - _dsc[i]->resize(dscX, y + lineHeight * i, dscW, lineHeight + 2); + _key[i]->resize(xoff + x, y + lineHeight * i, keyW, lineHeight + 2); + _dsc[i]->resize(xoff + dscX, y + lineHeight * i, dscW, lineHeight + 2); } displayKeyBindings(); -- cgit v1.2.3