aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-14 20:42:50 +0000
committerJohannes Schickel2008-09-14 20:42:50 +0000
commit41312a0eadfaa971a64da2a2319ace832b1e55be (patch)
tree9e380c185e822c86d2ddb2aa9400ab7232d9669a /engines
parent5fdd883327da62f66f4c70895ae1df3aa9154e71 (diff)
downloadscummvm-rg350-41312a0eadfaa971a64da2a2319ace832b1e55be.tar.gz
scummvm-rg350-41312a0eadfaa971a64da2a2319ace832b1e55be.tar.bz2
scummvm-rg350-41312a0eadfaa971a64da2a2319ace832b1e55be.zip
Added ScummVM logo to GMM.
svn-id: r34537
Diffstat (limited to 'engines')
-rw-r--r--engines/dialogs.cpp43
-rw-r--r--engines/dialogs.h3
2 files changed, 46 insertions, 0 deletions
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 3d93a0da23..7c5963544c 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -35,6 +35,7 @@
#include "gui/eval.h"
#include "gui/newgui.h"
#include "gui/ListWidget.h"
+#include "gui/theme.h"
#include "engines/dialogs.h"
#include "engines/engine.h"
@@ -77,7 +78,18 @@ enum {
MainMenuDialog::MainMenuDialog(Engine *engine)
: GlobalDialog("globalmain"), _engine(engine) {
+#ifndef DISABLE_FANCY_THEMES
+ _logo = 0;
+ if (g_gui.evaluator()->getVar("global_logo.visible") == 1 && g_gui.theme()->supportsImages()) {
+ _logo = new GUI::GraphicsWidget(this, "global_logo");
+ _logo->useThemeTransparency(true);
+ _logo->setGfx(g_gui.theme()->getImageSurface(GUI::Theme::kImageLogoSmall));
+ } else {
+ new StaticTextWidget(this, "global_title", "ScummVM");
+ }
+#else
new StaticTextWidget(this, "global_title", "ScummVM");
+#endif
new StaticTextWidget(this, "global_version", gScummVMVersionDate);
@@ -136,6 +148,37 @@ void MainMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
}
}
+void MainMenuDialog::reflowLayout() {
+#ifndef DISABLE_FANCY_THEMES
+ if (g_gui.evaluator()->getVar("global_logo.visible") == 1 && g_gui.theme()->supportsImages()) {
+ if (!_logo)
+ _logo = new GUI::GraphicsWidget(this, "global_logo");
+ _logo->useThemeTransparency(true);
+ _logo->setGfx(g_gui.theme()->getImageSurface(GUI::Theme::kImageLogoSmall));
+
+ GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("global_title");
+ if (title) {
+ removeWidget(title);
+ title->setNext(0);
+ delete title;
+ }
+ } else {
+ GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("global_title");
+ if (!title)
+ new StaticTextWidget(this, "global_title", "ScummVM");
+
+ if (_logo) {
+ removeWidget(_logo);
+ _logo->setNext(0);
+ delete _logo;
+ _logo = 0;
+ }
+ }
+#endif
+
+ Dialog::reflowLayout();
+}
+
enum {
kOKCmd = 'ok '
};
diff --git a/engines/dialogs.h b/engines/dialogs.h
index 61c06006cb..66ea13b8f1 100644
--- a/engines/dialogs.h
+++ b/engines/dialogs.h
@@ -49,9 +49,12 @@ public:
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
+ virtual void reflowLayout();
+
protected:
Engine *_engine;
+ GUI::GraphicsWidget *_logo;
GUI::ButtonWidget *_rtlButton;
GUI::Dialog *_aboutDialog;
GUI::Dialog *_optionsDialog;