aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/dialogs.cpp45
-rw-r--r--gui/ThemeEngine.h2
-rw-r--r--gui/themes/default.inc70
-rw-r--r--gui/themes/scummclassic.zipbin42002 -> 43805 bytes
-rw-r--r--gui/themes/scummclassic/classic_layout.stx36
-rw-r--r--gui/themes/scummclassic/classic_layout_320.stx36
-rw-r--r--gui/themes/scummodern.zipbin125107 -> 144239 bytes
-rw-r--r--gui/themes/scummodern/scummodern_gfx.stx2
-rw-r--r--gui/themes/scummodern/scummodern_layout.stx42
-rw-r--r--gui/themes/scummodern/scummodern_layout_320.stx36
10 files changed, 244 insertions, 25 deletions
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 8d8888246b..b6d4a6d75e 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -73,38 +73,39 @@ enum {
};
MainMenuDialog::MainMenuDialog(Engine *engine)
- : GlobalDialog("globalmain"), _engine(engine) {
+ : GlobalDialog("GlobalMenu"), _engine(engine) {
+ _backgroundType = GUI::Theme::kDialogBackgroundSpecial;
#ifndef DISABLE_FANCY_THEMES
_logo = 0;
- if (g_gui.xmlEval()->getVar("global_logo.visible") == 1 && g_gui.theme()->supportsImages()) {
- _logo = new GUI::GraphicsWidget(this, "global_logo");
+ if (g_gui.xmlEval()->getVar("Globals.ShowGlobalMenuLogo", 0) == 1 && g_gui.theme()->supportsImages()) {
+ _logo = new GUI::GraphicsWidget(this, "GlobalMenu.Logo");
_logo->useThemeTransparency(true);
_logo->setGfx(g_gui.theme()->getImageSurface(GUI::Theme::kImageLogoSmall));
} else {
- new StaticTextWidget(this, "global_title", "ScummVM");
+ new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
}
#else
- new StaticTextWidget(this, "global_title", "ScummVM");
+ new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
#endif
- new StaticTextWidget(this, "global_version", gScummVMVersionDate);
+ new StaticTextWidget(this, "GlobalMenu.Version", gScummVMVersionDate);
- new GUI::ButtonWidget(this, "globalmain_resume", "Resume", kPlayCmd, 'P');
+ new GUI::ButtonWidget(this, "GlobalMenu.Resume", "Resume", kPlayCmd, 'P');
// new GUI::ButtonWidget(this, "globalmain_load", "Load", kLoadCmd, 'L');
// new GUI::ButtonWidget(this, "globalmain_save", "Save", kSaveCmd, 'S');
- new GUI::ButtonWidget(this, "globalmain_options", "Options", kOptionsCmd, 'O');
+ new GUI::ButtonWidget(this, "GlobalMenu.Options", "Options", kOptionsCmd, 'O');
- new GUI::ButtonWidget(this, "globalmain_about", "About", kAboutCmd, 'A');
+ new GUI::ButtonWidget(this, "GlobalMenu.About", "About", kAboutCmd, 'A');
- _rtlButton = new GUI::ButtonWidget(this, "globalmain_rtl", "Return to Launcher", kRTLCmd, 'R');
+ _rtlButton = new GUI::ButtonWidget(this, "GlobalMenu.RTL", "Return to Launcher", kRTLCmd, 'R');
// '0' corresponds to the kSupportsRTL MetaEngineFeature
_rtlButton->setEnabled(_engine->hasFeature(0));
- new GUI::ButtonWidget(this, "globalmain_quit", "Quit", kQuitCmd, 'Q');
+ new GUI::ButtonWidget(this, "GlobalMenu.Quit", "Quit", kQuitCmd, 'Q');
_aboutDialog = new GUI::AboutDialog();
_optionsDialog = new ConfigDialog();
@@ -147,22 +148,22 @@ void MainMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
void MainMenuDialog::reflowLayout() {
#ifndef DISABLE_FANCY_THEMES
- if (g_gui.xmlEval()->getVar("global_logo.visible") == 1 && g_gui.theme()->supportsImages()) {
+ if (g_gui.xmlEval()->getVar("Globals.ShowGlobalMenuLogo", 0) == 1 && g_gui.theme()->supportsImages()) {
if (!_logo)
- _logo = new GUI::GraphicsWidget(this, "global_logo");
+ _logo = new GUI::GraphicsWidget(this, "GlobalMenu.Logo");
_logo->useThemeTransparency(true);
_logo->setGfx(g_gui.theme()->getImageSurface(GUI::Theme::kImageLogoSmall));
- GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("global_title");
+ GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("GlobalMenu.Title");
if (title) {
removeWidget(title);
title->setNext(0);
delete title;
}
} else {
- GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("global_title");
+ GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("GlobalMenu.Title");
if (!title)
- new StaticTextWidget(this, "global_title", "ScummVM");
+ new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
if (_logo) {
removeWidget(_logo);
@@ -210,30 +211,30 @@ enum {
// "" as value for the domain, and in fact provide a somewhat better user
// experience at the same time.
ConfigDialog::ConfigDialog()
- : GUI::OptionsDialog("", "scummconfig") {
+ : GUI::OptionsDialog("", "ScummConfig") {
//
// Sound controllers
//
- addVolumeControls(this, "scummconfig_");
+ addVolumeControls(this, "ScummConfig.");
//
// Some misc options
//
// SCUMM has a talkspeed range of 0-9
- addSubtitleControls(this, "scummconfig_", 9);
+ addSubtitleControls(this, "ScummConfig.", 9);
//
// Add the buttons
//
- new GUI::ButtonWidget(this, "scummconfig_ok", "OK", GUI::OptionsDialog::kOKCmd, 'O');
- new GUI::ButtonWidget(this, "scummconfig_cancel", "Cancel", kCloseCmd, 'C');
+ new GUI::ButtonWidget(this, "ScummConfig.Ok", "OK", GUI::OptionsDialog::kOKCmd, 'O');
+ new GUI::ButtonWidget(this, "ScummConfig.Cancel", "Cancel", kCloseCmd, 'C');
#ifdef SMALL_SCREEN_DEVICE
- new GUI::ButtonWidget(this, "scummconfig_keys", "Keys", kKeysCmd, 'K');
+ new GUI::ButtonWidget(this, "ScummConfig.Keys", "Keys", kKeysCmd, 'K');
//
// Create the sub dialog(s)
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 2d99076fc3..8f8b06def4 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -503,6 +503,8 @@ public:
const Graphics::Surface *getImageSurface(const kThemeImages n) const {
if (n == kImageLogo)
return _bitmaps.contains("logo.bmp") ? _bitmaps["logo.bmp"] : 0;
+ else if (n == kImageLogoSmall)
+ return _bitmaps.contains("logo_small.bmp") ? _bitmaps["logo_small.bmp"] : 0;
return 0;
}
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index c0ea4a9228..f2ef86d241 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -314,6 +314,7 @@
"<def var = 'PopUpWidget.labelSpacing' value = '10' /> "
"<def var = 'Layout.Spacing' value = '8' /> "
"<def var = 'ShowLauncherLogo' value = '0'/> "
+"<def var = 'ShowGlobalMenuLogo' value = '0'/> "
"<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/> "
"<widget name = 'OptionsLabel' "
"size = '110, Globals.Line.Height' "
@@ -705,6 +706,40 @@
"</layout> "
"</layout> "
"</dialog> "
+"<dialog name = 'GlobalMenu' overlays = 'screen_center'> "
+"<layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'> "
+"<widget name = 'Title' "
+"width = '210' "
+"height = 'Globals.Line.Height' "
+"/> "
+"<widget name = 'Version' "
+"width = '210' "
+"height = 'Globals.Line.Height' "
+"/> "
+"<widget name = 'Resume' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<space size = '10'/> "
+"<widget name = 'Options' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'About' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<space size = '10'/> "
+"<widget name = 'RTL' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'Quit' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"</layout> "
+"</dialog> "
"<dialog name = 'ScummMain' overlays = 'screen_center'> "
"<layout type = 'vertical' padding = '8, 8, 8, 8'> "
"<widget name = 'Resume' "
@@ -861,6 +896,7 @@
"<def var = 'PopUpWidget.labelSpacing' value = '6' /> "
"<def var = 'Layout.Spacing' value = '8'/> "
"<def var = 'ShowLauncherLogo' value = '0'/> "
+"<def var = 'ShowGlobalMenuLogo' value = '0'/> "
"<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '0'/> "
"<widget name = 'Button' "
"size = 'kButtonWidth, kButtonHeight' "
@@ -1252,6 +1288,40 @@
"</layout> "
"</layout> "
"</dialog> "
+"<dialog name = 'GlobalMenu' overlays = 'screen_center'> "
+"<layout type = 'vertical' padding = '8, 8, 8, 8' center = 'true'> "
+"<widget name = 'Title' "
+"width = '120' "
+"height = 'Globals.Line.Height' "
+"/> "
+"<widget name = 'Version' "
+"width = '120' "
+"height = 'Globals.Line.Height' "
+"/> "
+"<widget name = 'Resume' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<space size = '4'/> "
+"<widget name = 'Options' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'About' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<space size = '4'/> "
+"<widget name = 'RTL' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'Quit' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"</layout> "
+"</dialog> "
"<dialog name = 'ScummMain' overlays = 'screen_center'> "
"<layout type = 'vertical' padding = '8, 8, 8, 8'> "
"<widget name = 'Resume' "
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 5f04792330..e285958029 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 9416a5a4a0..0704c8e91d 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -35,6 +35,7 @@
<def var = 'Layout.Spacing' value = '8' />
<def var = 'ShowLauncherLogo' value = '0'/>
+ <def var = 'ShowGlobalMenuLogo' value = '0'/>
<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/>
@@ -448,6 +449,41 @@
</layout>
</dialog>
+ <dialog name = 'GlobalMenu' overlays = 'screen_center'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'>
+ <widget name = 'Title'
+ width = '210'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'Version'
+ width = '210'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'Resume'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '10'/>
+ <widget name = 'Options'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'About'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '10'/>
+ <widget name = 'RTL'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'Quit'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ </layout>
+ </dialog>
+
<dialog name = 'ScummMain' overlays = 'screen_center'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'Resume'
diff --git a/gui/themes/scummclassic/classic_layout_320.stx b/gui/themes/scummclassic/classic_layout_320.stx
index 89ed033bd5..9c03d51e13 100644
--- a/gui/themes/scummclassic/classic_layout_320.stx
+++ b/gui/themes/scummclassic/classic_layout_320.stx
@@ -36,6 +36,7 @@
<def var = 'Layout.Spacing' value = '8'/>
<def var = 'ShowLauncherLogo' value = '0'/>
+ <def var = 'ShowGlobalMenuLogo' value = '0'/>
<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '0'/>
<widget name = 'Button'
@@ -448,6 +449,41 @@
</layout>
</layout>
</dialog>
+
+ <dialog name = 'GlobalMenu' overlays = 'screen_center'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' center = 'true'>
+ <widget name = 'Title'
+ width = '120'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'Version'
+ width = '120'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'Resume'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '4'/>
+ <widget name = 'Options'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'About'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '4'/>
+ <widget name = 'RTL'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'Quit'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ </layout>
+ </dialog>
<dialog name = 'ScummMain' overlays = 'screen_center'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
diff --git a/gui/themes/scummodern.zip b/gui/themes/scummodern.zip
index 93977a3cc7..70141bfce9 100644
--- a/gui/themes/scummodern.zip
+++ b/gui/themes/scummodern.zip
Binary files differ
diff --git a/gui/themes/scummodern/scummodern_gfx.stx b/gui/themes/scummodern/scummodern_gfx.stx
index c9f4c35985..b8eff77aa1 100644
--- a/gui/themes/scummodern/scummodern_gfx.stx
+++ b/gui/themes/scummodern/scummodern_gfx.stx
@@ -56,6 +56,7 @@
<bitmap filename = 'cursor.bmp'/>
<bitmap filename = 'cursor_small.bmp'/>
<bitmap filename = 'checkbox.bmp'/>
+ <bitmap filename = 'logo_small.bmp'/>
</bitmaps>
<fonts>
@@ -117,6 +118,7 @@
gradient_start = '208, 112, 8'
gradient_end = '232, 192, 16'
shadow = '3'
+ gradient_factor = '3'
/>
</drawdata>
diff --git a/gui/themes/scummodern/scummodern_layout.stx b/gui/themes/scummodern/scummodern_layout.stx
index c1029088af..03d920ac05 100644
--- a/gui/themes/scummodern/scummodern_layout.stx
+++ b/gui/themes/scummodern/scummodern_layout.stx
@@ -43,6 +43,7 @@
<def var = 'PopUpWidget.labelSpacing' value = '10' />
<def var = 'ShowLauncherLogo' value = '1'/>
+ <def var = 'ShowGlobalMenuLogo' value = '1'/>
<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/>
@@ -108,7 +109,7 @@
<widget name = 'LoadGameButton'
type = 'Button'
/>
- <space size = '16' />
+ <space size = '10' />
<widget name = 'AddGameButton'
type = 'Button'
/>
@@ -118,14 +119,14 @@
<widget name = 'RemoveGameButton'
type = 'Button'
/>
- <space size = '16' />
+ <space size = '10' />
<widget name = 'OptionsButton'
type = 'Button'
/>
<widget name = 'AboutButton'
type = 'Button'
/>
- <space size = '16' />
+ <space size = '10' />
<widget name = 'QuitButton'
type = 'Button'
/>
@@ -460,6 +461,41 @@
</layout>
</dialog>
+ <dialog name = 'GlobalMenu' overlays = 'screen_center'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'>
+ <widget name = 'Logo'
+ width = '210'
+ height = '40'
+ />
+ <widget name = 'Version'
+ width = '210'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'Resume'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '10'/>
+ <widget name = 'Options'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'About'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '10'/>
+ <widget name = 'RTL'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'Quit'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ </layout>
+ </dialog>
+
<dialog name = 'ScummMain' overlays = 'screen_center'>
<layout type = 'vertical' padding = '8, 8, 8, 8'>
<widget name = 'Resume'
diff --git a/gui/themes/scummodern/scummodern_layout_320.stx b/gui/themes/scummodern/scummodern_layout_320.stx
index e154ffdb9a..b92ded6097 100644
--- a/gui/themes/scummodern/scummodern_layout_320.stx
+++ b/gui/themes/scummodern/scummodern_layout_320.stx
@@ -34,6 +34,7 @@
<def var = 'PopUpWidget.labelSpacing' value = '6' />
<def var = 'ShowLauncherLogo' value = '0'/>
+ <def var = 'ShowGlobalMenuLogo' value = '0'/>
<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '0'/>
<widget name = 'Button'
@@ -445,6 +446,41 @@
</layout>
</layout>
</dialog>
+
+ <dialog name = 'GlobalMenu' overlays = 'screen_center'>
+ <layout type = 'vertical' padding = '8, 8, 8, 8' center = 'true'>
+ <widget name = 'Title'
+ width = '120'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'Version'
+ width = '120'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'Resume'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '4'/>
+ <widget name = 'Options'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'About'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '4'/>
+ <widget name = 'RTL'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'Quit'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ </layout>
+ </dialog>
<dialog name = 'ScummMain' overlays = 'screen_center'>
<layout type = 'vertical' padding = '4, 4, 4, 4'>