aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorVicent Marti2008-08-15 16:44:44 +0000
committerVicent Marti2008-08-15 16:44:44 +0000
commit784c1114cc07363359d1e8ae7d12152157b7983b (patch)
treefa28a39555a4bfe1320cc56c2c843553b54469c6 /engines/scumm
parent57e2c128df4cfa4674bead48a0ac8640b9c99781 (diff)
downloadscummvm-rg350-784c1114cc07363359d1e8ae7d12152157b7983b.tar.gz
scummvm-rg350-784c1114cc07363359d1e8ae7d12152157b7983b.tar.bz2
scummvm-rg350-784c1114cc07363359d1e8ae7d12152157b7983b.zip
Deprecated support for "direction" layout keys.
svn-id: r33904
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/dialogs.cpp13
1 files changed, 8 insertions, 5 deletions
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();