diff options
-rw-r--r-- | gui/massadd.cpp | 30 | ||||
-rw-r--r-- | gui/theme-config.cpp | 11 | ||||
-rw-r--r-- | gui/theme.h | 2 | ||||
-rw-r--r-- | gui/themes/modern.ini | 13 |
4 files changed, 32 insertions, 24 deletions
diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 25a0848378..e3f0e63e6e 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -56,7 +56,7 @@ enum { MassAddDialog::MassAddDialog(const FilesystemNode &startDir) - : Dialog(10, 20, 300, 174), + : Dialog("massadddialog"), _dirsScanned(0), _okButton(0), _dirProgressText(0), @@ -66,16 +66,6 @@ MassAddDialog::MassAddDialog(const FilesystemNode &startDir) _scanStack.push(startDir); - int buttonWidth, buttonHeight; - - if (g_gui.getWidgetSize() == kBigWidgetSize) { - buttonWidth = kBigButtonWidth; - buttonHeight = kBigButtonHeight; - } else { - buttonWidth = kButtonWidth; - buttonHeight = kButtonHeight; - } - // Create dialog items // We need: // - "OK" button, only enabled after the scan has finished @@ -84,22 +74,18 @@ MassAddDialog::MassAddDialog(const FilesystemNode &startDir) // - static text displaying the progress text // - (future) a listbox showing all the games we added/are going to add - new StaticTextWidget(this, 10, 10 + 1 * kLineHeight, _w - 2*10, kLineHeight, - "Mass Add Dialog", kTextAlignCenter); - - _dirProgressText = new StaticTextWidget(this, 10, 10 + 3 * kLineHeight, _w - 2*10, kLineHeight, - "... progress ...", kTextAlignCenter); + new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog"); - _gameProgressText = new StaticTextWidget(this, 10, 10 + 4 * kLineHeight, _w - 2*10, kLineHeight, - "... progress ...", kTextAlignCenter); + _dirProgressText = new StaticTextWidget(this, "massadddialog_dirprogress", + "... progress ..."); - int okButtonPos = (_w - (buttonWidth * 2)) / 2; - int cancelButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10; + _gameProgressText = new StaticTextWidget(this, "massadddialog_gameprogress", + "... progress ..."); - _okButton = addButton(this, okButtonPos, _h - buttonHeight - 8, "OK", kOkCmd, '\n'); + _okButton = new ButtonWidget(this, "massadddialog_ok", "OK", kOkCmd, '\n'); _okButton->setEnabled(false); - addButton(this, cancelButtonPos, _h - buttonHeight - 8, "Cancel", kCancelCmd, '\27'); + new ButtonWidget(this, "massadddialog_cancel", "Cancel", kCancelCmd, '\27'); } diff --git a/gui/theme-config.cpp b/gui/theme-config.cpp index 36c8cc5b60..8e538f2021 100644 --- a/gui/theme-config.cpp +++ b/gui/theme-config.cpp @@ -293,6 +293,17 @@ const char *Theme::_defaultConfigINI = "keysdialog_action=prev.x (parent.h - kLineHeight * 3) (parent.w - self.x * 2) kLineHeight\n" "keysdialog_mapping=prev.x (prev.y + kLineHeight) prev.w prev.h\n" "\n" +"### mass add dialog\n" +"massadddialog=10 20 300 174\n" +"set_parent=massadddialog\n" +"massadddialog_caption=10 (10 + 1 * kLineHeight) (parent.w - 2*10) kLineHeight\n" +"massadddialog_caption.align=kTextAlignCenter\n" +"massadddialog_dirprogress=10 (10 + 3 * kLineHeight) (parent.w - 2*10) kLineHeight\n" +"massadddialog_dirprogress.align=kTextAlignCenter\n" +"massadddialog_gameprogress=10 (10 + 4 * kLineHeight) (parent.w - 2*10) kLineHeight\n" +"massadddialog_gameprogress.align=kTextAlignCenter\n" +"massadddialog_ok=((parent.w - (buttonWidth * 2)) / 2) (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n" +"massadddialog_cancel=(prev.x2 + 10) prev.y prev.w prev.h\n" "\n" "\n" "##### SCUMM dialogs\n" diff --git a/gui/theme.h b/gui/theme.h index 70dda8332e..7f04063391 100644 --- a/gui/theme.h +++ b/gui/theme.h @@ -32,7 +32,7 @@ #include "graphics/surface.h" #include "graphics/fontman.h" -#define THEME_VERSION 20 +#define THEME_VERSION 21 namespace GUI { diff --git a/gui/themes/modern.ini b/gui/themes/modern.ini index 3a1bbc9e2b..c5c8d8c46c 100644 --- a/gui/themes/modern.ini +++ b/gui/themes/modern.ini @@ -1,7 +1,7 @@ # $URL$ # $Id$ [theme] -version=20 +version=21 type=modern name=Modern Style @@ -383,6 +383,17 @@ keysdialog_action.align=kTextAlignCenter keysdialog_mapping=prev.x (prev.y + kLineHeight) prev.w prev.h keysdialog_mapping.align=kTextAlignCenter +### mass add dialog +massadddialog=10 20 300 174 +set_parent=massadddialog +massadddialog_caption=10 (10 + 1 * kLineHeight) (parent.w - 2*10) kLineHeight +massadddialog_caption.align=kTextAlignCenter +massadddialog_dirprogress=10 (10 + 3 * kLineHeight) prev.w prev.h +massadddialog_dirprogress.align=kTextAlignCenter +massadddialog_gameprogress=10 (10 + 4 * kLineHeight) prev.w prev.h +massadddialog_gameprogress.align=kTextAlignCenter +massadddialog_ok=((parent.w - (buttonWidth * 2)) / 2) (parent.h - buttonHeight - 8) buttonWidth buttonHeight +massadddialog_cancel=(prev.x2 + 10) prev.y prev.w prev.h ##### SCUMM dialogs |