aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeEval.cpp5
-rw-r--r--gui/ThemeEval.h2
-rw-r--r--gui/ThemeParser.cpp54
-rw-r--r--gui/ThemeParser.h8
-rw-r--r--gui/ThemeRenderer.cpp23
-rw-r--r--gui/ThemeRenderer.h3
-rw-r--r--gui/console.cpp16
-rw-r--r--gui/launcher.cpp19
-rw-r--r--gui/newgui.cpp4
-rw-r--r--gui/options.cpp9
-rw-r--r--gui/themes/default.inc47
-rw-r--r--gui/themes/modern.stx59
-rw-r--r--gui/widget.cpp5
13 files changed, 199 insertions, 55 deletions
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp
index 96ac8098ad..fe520eb80b 100644
--- a/gui/ThemeEval.cpp
+++ b/gui/ThemeEval.cpp
@@ -196,7 +196,10 @@ void ThemeEval::buildBuiltinVars() {
_builtin["kBigButtonHeight"] = GUI::kBigButtonHeight;
_builtin["kBigSliderWidth"] = GUI::kBigSliderWidth;
_builtin["kBigSliderWidth"] = GUI::kBigSliderWidth;
- _builtin["kBigSliderHeight"] = GUI::kBigSliderHeight;
+ _builtin["kBigSliderHeight"] = GUI::kBigSliderHeight;
+
+ _builtin["kNormalWidgetSize"] = GUI::kNormalWidgetSize;
+ _builtin["kBigWidgetSize"] = GUI::kBigWidgetSize;
}
diff --git a/gui/ThemeEval.h b/gui/ThemeEval.h
index 4d5a3db5f6..c12fa12fa9 100644
--- a/gui/ThemeEval.h
+++ b/gui/ThemeEval.h
@@ -375,7 +375,7 @@ public:
}
void debugDraw(Graphics::Surface *screen, const Graphics::Font *font) {
- _layouts["Dialog.Browser"]->debugDraw(screen, font);
+ _layouts["Dialog.Launcher"]->debugDraw(screen, font);
// _layouts["Dialog.GameOptions_Graphics"]->debugDraw(screen, font);
}
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 010fcaeaf3..d9275b1df0 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -129,6 +129,11 @@ bool ThemeParser::parserCallback_defaults(ParserNode *node) {
bool ThemeParser::parserCallback_font(ParserNode *node) {
int red, green, blue;
+
+ if (resolutionCheck(node->values["resolution"])) {
+ node->ignore = true;
+ return true;
+ }
if (_palette.contains(node->values["color"]))
getPaletteColor(node->values["color"], red, green, blue);
@@ -226,6 +231,11 @@ bool ThemeParser::parserCallback_drawstep(ParserNode *node) {
bool ThemeParser::parserCallback_drawdata(ParserNode *node) {
bool cached = false;
+
+ if (resolutionCheck(node->values["resolution"])) {
+ node->ignore = true;
+ return true;
+ }
if (node->values.contains("cache")) {
if (node->values["cache"] == "true")
@@ -235,16 +245,6 @@ bool ThemeParser::parserCallback_drawdata(ParserNode *node) {
else return parserError("'Parsed' value must be either true or false.");
}
- // Both Max and Johannes suggest using a non-platform specfic approach based on available
- // resources and active resolution. getHostPlatformString() has been removed, so fix this.
-
-/* if (drawdataNode->values.contains("platform")) {
- if (drawdataNode->values["platform"].compareToIgnoreCase(Common::getHostPlatformString()) != 0) {
- drawdataNode->ignore = true;
- return true;
- }
- }*/
-
if (_theme->addDrawData(node->values["id"], cached) == false)
return parserError("Error when adding Draw Data set: Invalid DrawData name.");
@@ -437,10 +437,18 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst
}
bool ThemeParser::parserCallback_def(ParserNode *node) {
+ if (resolutionCheck(node->values["resolution"])) {
+ node->ignore = true;
+ return true;
+ }
+
Common::String var = "Globals." + node->values["var"];
int value;
- if (!parseIntegerKey(node->values["value"].c_str(), 1, &value))
+ if (_theme->themeEval()->hasVar(node->values["value"]) == true)
+ value = _theme->themeEval()->getVar(node->values["value"]);
+
+ else if (!parseIntegerKey(node->values["value"].c_str(), 1, &value))
return parserError("Invalid definition for '%s'.", var.c_str());
_theme->themeEval()->setVar(var, value);
@@ -451,9 +459,16 @@ bool ThemeParser::parserCallback_widget(ParserNode *node) {
Common::String var;
if (getParentNode(node)->name == "globals") {
+
+ if (resolutionCheck(node->values["resolution"])) {
+ node->ignore = true;
+ return true;
+ }
+
var = "Globals." + node->values["name"] + ".";
if (!parseCommonLayoutProps(node, var))
return parserError("Error when parsing Layout properties of '%s'.", var.c_str());
+
} else {
var = node->values["name"];
int width = -1;
@@ -502,6 +517,11 @@ bool ThemeParser::parserCallback_dialog(ParserNode *node) {
Common::String var = "Dialog." + node->values["name"];
bool enabled = true;
+ if (resolutionCheck(node->values["resolution"])) {
+ node->ignore = true;
+ return true;
+ }
+
if (node->values.contains("enabled")) {
if (node->values["enabled"] == "false")
enabled = false;
@@ -703,4 +723,16 @@ bool ThemeParser::parseCommonLayoutProps(ParserNode *node, const Common::String
return true;
}
+bool ThemeParser::resolutionCheck(const Common::String &resolution) {
+ if (resolution.empty())
+ return false;
+
+ Common::StringTokenizer tokenizer(resolution, "x");
+ Common::String w = tokenizer.nextToken();
+ Common::String h = tokenizer.nextToken();
+
+ return ((w == "X" || atoi(w.c_str()) == g_system->getOverlayWidth()) &&
+ (h == "Y" || atoi(h.c_str()) == g_system->getOverlayHeight())) == false;
+}
+
}
diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h
index ad7f2b36be..bae015cf25 100644
--- a/gui/ThemeParser.h
+++ b/gui/ThemeParser.h
@@ -331,7 +331,6 @@ protected:
ThemeRenderer *_theme;
CUSTOM_XML_PARSER(ThemeParser) {
-
XML_KEY(render_info)
XML_KEY(palette)
XML_KEY(color)
@@ -345,6 +344,7 @@ protected:
XML_PROP(id, true)
XML_PROP(file, true)
XML_PROP(color, true)
+ XML_PROP(resolution, false)
KEY_END()
KEY_END()
@@ -365,6 +365,7 @@ protected:
XML_KEY(drawdata)
XML_PROP(id, true)
XML_PROP(cache, false)
+ XML_PROP(resolution, false)
XML_KEY(defaults)
XML_PROP(stroke, false)
@@ -417,6 +418,7 @@ protected:
XML_KEY(def)
XML_PROP(var, true)
XML_PROP(value, true)
+ XML_PROP(resolution, false)
KEY_END()
XML_KEY(widget)
@@ -424,6 +426,7 @@ protected:
XML_PROP(size, false)
XML_PROP(pos, false)
XML_PROP(padding, false)
+ XML_PROP(resolution, false)
XML_KEY(child)
XML_PROP(name, true)
@@ -438,6 +441,7 @@ protected:
XML_PROP(overlays, true)
XML_PROP(shading, false)
XML_PROP(enabled, false)
+ XML_PROP(resolution, false)
XML_KEY(layout)
XML_PROP(type, true)
XML_PROP(center, false)
@@ -492,6 +496,8 @@ protected:
bool closedKeyCallback(ParserNode *node);
+ bool resolutionCheck(const Common::String &resolution);
+
void cleanup();
Graphics::DrawStep *newDrawStep();
diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp
index f2dfb4fd1f..fc6f34fa9c 100644
--- a/gui/ThemeRenderer.cpp
+++ b/gui/ThemeRenderer.cpp
@@ -113,8 +113,6 @@ ThemeRenderer::ThemeRenderer(Common::String themeName, GraphicsMode mode) :
_graphicsMode = mode;
setGraphicsMode(_graphicsMode);
- loadConfigFile("modern");
-
if (_screen->w >= 400 && _screen->h >= 300) {
_font = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
} else {
@@ -138,9 +136,6 @@ bool ThemeRenderer::init() {
if (isThemeLoadingRequired() || !_themeOk) {
loadTheme(_themeName);
-
- Theme::loadTheme(_defaultConfig);
- Theme::loadTheme(_configFile, false, true);
}
return true;
@@ -240,12 +235,10 @@ bool ThemeRenderer::addFont(const Common::String &fontId, const Common::String &
return false;
if (_texts[textId] != 0)
- return false;
+ delete _texts[textId];
_texts[textId] = new TextDrawData;
-// _texts[textId]->_fontPtr = _font;
-
if (file == "default") {
_texts[textId]->_fontPtr = _font;
} else {
@@ -271,8 +264,11 @@ bool ThemeRenderer::addFont(const Common::String &fontId, const Common::String &
bool ThemeRenderer::addDrawData(const Common::String &data, bool cached) {
DrawData data_id = getDrawDataId(data);
- if (data_id == -1 || _widgets[data_id] != 0)
+ if (data_id == -1)
return false;
+
+ if (_widgets[data_id] != 0)
+ delete _widgets[data_id];
_widgets[data_id] = new WidgetDrawData;
_widgets[data_id]->_cached = cached;
@@ -684,6 +680,15 @@ void ThemeRenderer::drawText(const Common::Rect &r, const Common::String &str, W
}
}
+void ThemeRenderer::drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, WidgetStateInfo state) {
+ if (!ready())
+ return;
+
+ restoreBackground(r);
+ font->drawChar(_screen, ch, r.left, r.top, 0);
+ addDirtyRect(r);
+}
+
void ThemeRenderer::debugWidgetPosition(const char *name, const Common::Rect &r) {
_font->drawString(_screen, name, r.left, r.top, r.width(), 0xFFFF, Graphics::kTextAlignRight, 0, true);
_screen->hLine(r.left, r.top, r.right, 0xFFFF);
diff --git a/gui/ThemeRenderer.h b/gui/ThemeRenderer.h
index 39fa6910d1..b131b6b5e7 100644
--- a/gui/ThemeRenderer.h
+++ b/gui/ThemeRenderer.h
@@ -330,7 +330,7 @@ public:
WidgetStateInfo state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font);
void drawChar(const Common::Rect &r, byte ch,
- const Graphics::Font *font, WidgetStateInfo state) {}
+ const Graphics::Font *font, WidgetStateInfo state);
/**
* Actual implementation of a Dirty Rect drawing routine.
@@ -435,6 +435,7 @@ public:
}
void *evaluator() { return _themeEval; }
+ bool supportsImages() const { return true; }
protected:
diff --git a/gui/console.cpp b/gui/console.cpp
index 728724d76f..de4db14a4f 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -25,6 +25,7 @@
#include "gui/console.h"
#include "gui/ScrollBarWidget.h"
#include "gui/eval.h"
+#include "gui/ThemeEval.h"
#include "engines/engine.h"
#include "base/version.h"
@@ -97,17 +98,14 @@ ConsoleDialog::ConsoleDialog(float widthPercent, float heightPercent)
void ConsoleDialog::init() {
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
- int f = g_gui.evaluator()->getVar("Console.font");
- if (f == EVAL_UNDEF_VAR)
- _font = FontMan.getFontByUsage(Graphics::FontManager::kConsoleFont);
- else
- _font = g_gui.theme()->getFont((Theme::FontStyle)f);
+ _font = FontMan.getFontByUsage((Graphics::FontManager::FontUsage)
+ g_gui.xmlEval()->getVar("Console.Font", Graphics::FontManager::kConsoleFont));
- _leftPadding = g_gui.evaluator()->getVar("Console.leftPadding", 0);
- _rightPadding = g_gui.evaluator()->getVar("Console.rightPadding", 0);
- _topPadding = g_gui.evaluator()->getVar("Console.topPadding", 0);
- _bottomPadding = g_gui.evaluator()->getVar("Console.bottomPadding", 0);
+ _leftPadding = g_gui.xmlEval()->getVar("Globals.Console.Padding.Left", 0);
+ _rightPadding = g_gui.xmlEval()->getVar("Globals.Console.Padding.Right", 0);
+ _topPadding = g_gui.xmlEval()->getVar("Globals.Console.Padding.Top", 0);
+ _bottomPadding = g_gui.xmlEval()->getVar("Globals.Console.Padding.Bottom", 0);
// Calculate the real width/height (rounded to char/line multiples)
_w = (uint16)(_widthPercent * screenW);
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 27d74a905a..62f1daf244 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -48,6 +48,7 @@
#include "sound/mididrv.h"
+#include "gui/ThemeEval.h"
using Common::ConfigManager;
@@ -145,7 +146,7 @@ protected:
EditGameDialog::EditGameDialog(const String &domain, const String &desc)
: OptionsDialog(domain, "GameOptions") {
- int labelWidth = g_gui.evaluator()->getVar("tabPopupsLabelW");
+ int labelWidth = g_gui.xmlEval()->getVar("Globals.TabLabelWidth");
// GAME: Path to game data (r/o), extra data (r/o), and save data (r/w)
String gamePath(ConfMan.get("path", _domain));
@@ -267,7 +268,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
void EditGameDialog::reflowLayout() {
OptionsDialog::reflowLayout();
- int labelWidth = g_gui.evaluator()->getVar("tabPopupsLabelW");
+ int labelWidth = g_gui.xmlEval()->getVar("Globals.TabLabelWidth");
if (_langPopUp)
_langPopUp->changeLabelWidth(labelWidth);
@@ -480,7 +481,7 @@ LauncherDialog::LauncherDialog()
#ifndef DISABLE_FANCY_THEMES
_logo = 0;
- if (g_gui.evaluator()->getVar("launcher_logo.visible") == 1 && g_gui.theme()->supportsImages()) {
+ if (g_gui.xmlEval()->getVar("Globals.ShowLauncherLogo") == 1 && g_gui.theme()->supportsImages()) {
_logo = new GraphicsWidget(this, "Launcher.Logo");
_logo->useThemeTransparency(true);
_logo->setGfx(g_gui.theme()->getImageSurface(Theme::kImageLogo));
@@ -878,21 +879,21 @@ void LauncherDialog::updateButtons() {
void LauncherDialog::reflowLayout() {
#ifndef DISABLE_FANCY_THEMES
- if (g_gui.evaluator()->getVar("launcher_logo.visible") == 1 && g_gui.theme()->supportsImages()) {
- StaticTextWidget *ver = (StaticTextWidget*)findWidget("launcher_version");
+ if (g_gui.xmlEval()->getVar("Globals.ShowLauncherLogo") == 1 && g_gui.theme()->supportsImages()) {
+ StaticTextWidget *ver = (StaticTextWidget*)findWidget("lLauncher.Version");
if (ver) {
- ver->setAlign((Graphics::TextAlignment)g_gui.evaluator()->getVar("launcher_version.align"));
+ ver->setAlign((Graphics::TextAlignment)g_gui.xmlEval()->getVar("Launcher.Version.Align", Graphics::kTextAlignCenter));
ver->setLabel(gScummVMVersionDate);
}
if (!_logo)
- _logo = new GraphicsWidget(this, "launcher_logo");
+ _logo = new GraphicsWidget(this, "Launcher.Logo");
_logo->useThemeTransparency(true);
_logo->setGfx(g_gui.theme()->getImageSurface(Theme::kImageLogo));
} else {
- StaticTextWidget *ver = (StaticTextWidget*)findWidget("launcher_version");
+ StaticTextWidget *ver = (StaticTextWidget*)findWidget("Launcher.Version");
if (ver) {
- ver->setAlign((Graphics::TextAlignment)g_gui.evaluator()->getVar("launcher_version.align"));
+ ver->setAlign((Graphics::TextAlignment)g_gui.xmlEval()->getVar("Launcher.Version.Align", Graphics::kTextAlignCenter));
ver->setLabel(gScummVMFullVersion);
}
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 9a0d8cef88..c89937595b 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -61,6 +61,8 @@ void GuiObject::reflowLayout() {
if (!g_gui.xmlEval()->getWidgetData(_name, _x, _y, _w, _h)) {
warning("Could not load widget position for '%s'", _name.c_str());
}
+
+ return;
if (_x < 0)
error("Widget <%s> has x < 0: %d", _name.c_str(), _x);
@@ -442,7 +444,7 @@ void NewGui::animateCursor() {
}
WidgetSize NewGui::getWidgetSize() {
- return (WidgetSize)(_theme->_evaluator->getVar("widgetSize"));
+ return (WidgetSize)(g_gui.xmlEval()->getVar("Globals.WidgetSize"));
}
void NewGui::clearDragWidget() {
diff --git a/gui/options.cpp b/gui/options.cpp
index b8b0ca70cb..12153469ef 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -28,6 +28,7 @@
#include "gui/eval.h"
#include "gui/message.h"
#include "gui/newgui.h"
+#include "gui/ThemeEval.h"
#include "gui/options.h"
#include "gui/PopUpWidget.h"
#include "gui/TabWidget.h"
@@ -500,7 +501,7 @@ void OptionsDialog::setSubtitleSettingsState(bool enabled) {
void OptionsDialog::addGraphicControls(GuiObject *boss, const String &prefix) {
const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
- int labelWidth = g_gui.evaluator()->getVar("tabPopupsLabelW");
+ int labelWidth = g_gui.xmlEval()->getVar("Globals.TabLabelWidth");
// The GFX mode popup
_gfxPopUp = new PopUpWidget(boss, prefix + "grModePopup", "Graphics mode:", labelWidth);
@@ -537,7 +538,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const String &prefix) {
}
void OptionsDialog::addAudioControls(GuiObject *boss, const String &prefix) {
- int labelWidth = g_gui.evaluator()->getVar("tabPopupsLabelW");
+ int labelWidth = g_gui.xmlEval()->getVar("Globals.TabLabelWidth");
// The MIDI mode popup & a label
_midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup", "Music driver:", labelWidth);
@@ -643,7 +644,7 @@ int OptionsDialog::getSubtitleMode(bool subtitles, bool speech_mute) {
void OptionsDialog::reflowLayout() {
Dialog::reflowLayout();
- int labelWidth = g_gui.evaluator()->getVar("tabPopupsLabelW");
+ int labelWidth = g_gui.xmlEval()->getVar("Globals.TabLabelWidth");
if (_midiPopUp)
_midiPopUp->changeLabelWidth(labelWidth);
@@ -723,7 +724,7 @@ GlobalOptionsDialog::GlobalOptionsDialog()
new ButtonWidget(tab, "GlobalOptions_Misc.ThemeButton", "Theme:", kChooseThemeCmd, 0);
_curTheme = new StaticTextWidget(tab, "GlobalOptions_Misc.CurTheme", g_gui.theme()->getThemeName());
- int labelWidth = g_gui.evaluator()->getVar("tabPopupsLabelW");
+ int labelWidth = g_gui.xmlEval()->getVar("Globals.TabLabelWidth");
_autosavePeriodPopUp = new PopUpWidget(tab, "GlobalOptions_Misc.AutosavePeriod", "Autosave:", labelWidth);
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 41de1be85f..97b7d6a260 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -397,6 +397,9 @@
"<def var = 'Widget.Size' value = '32' /> "
"<def var = 'Line.Height' value = '16' /> "
"<def var = 'Font.Height' value = '16' /> "
+"<def var = 'TabLabelWidth' value = '110' /> "
+"<def var = 'WidgetSize' value = 'kBigWidgetSize' /> "
+"<def resolution = '320xY' var = 'WidgetSize' value = 'kNormalWidgetSize' /> "
"<def var = 'Padding.Bottom' value = '16' /> "
"<def var = 'Padding.Left' value = '16' /> "
"<def var = 'Padding.Right' value = '16' /> "
@@ -404,6 +407,8 @@
"<def var = 'ListWidget.hlLeftPadding' value = '0'/> "
"<def var = 'ListWidget.hlRightPadding' value = '16'/> "
"<def var = 'PopUpWidget.labelSpacing' value = '10' /> "
+"<def var = 'ShowLauncherLogo' value = '1'/> "
+"<def resolution = '320xY' var = 'ShowLauncherLogo' value = '0'/> "
"<widget name = 'OptionsLabel' "
"size = '110, Globals.Line.Height' "
"/> "
@@ -411,7 +416,11 @@
"size = '24, Globals.Line.Height' "
"/> "
"<widget name = 'Button' "
-"size = '108, 24' "
+"size = 'kBigButtonWidth, kBigButtonHeight' "
+"/> "
+"<widget resolution = '320xY' "
+"name = 'Button' "
+"size = 'kButtonWidth, kButtonHeight' "
"/> "
"<widget name = 'Slider' "
"size = '128, 18' "
@@ -487,6 +496,42 @@
"</layout> "
"</layout> "
"</dialog> "
+"<dialog resolution = '320xY' name = 'Launcher' overlays = 'screen'> "
+"<layout type = 'vertical' center = 'true' padding = '8, 8, 8, 8'> "
+"<widget name = 'Version' "
+"height = 'Globals.Line.Height' "
+"/> "
+"<widget name = 'GameList' width = '304' height = '120'/> "
+"<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6'> "
+"<widget name = 'AddGameButton' "
+"width = '95' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'EditGameButton' "
+"width = '95' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'RemoveGameButton' "
+"width = '95' "
+"height = 'Globals.Button.Height' "
+"/> "
+"</layout> "
+"<layout type = 'horizontal' padding = '0, 0, 0, 0'> "
+"<widget name = 'QuitButton' "
+"type = 'Button' "
+"/> "
+"<widget name = 'AboutButton' "
+"type = 'Button' "
+"/> "
+"<widget name = 'OptionsButton' "
+"type = 'Button' "
+"/> "
+"<widget name = 'StartButton' "
+"type = 'Button' "
+"/> "
+"</layout> "
+"</layout> "
+"</dialog> "
"<dialog name = 'Browser' overlays = 'Dialog.Launcher.GameList' shading = 'dim'> "
"<layout type = 'vertical' padding = '8, 8, 8, 8' direction = 'bottom2top'> "
"<layout type = 'horizontal' padding = '0, 0, 16, 0' direction = 'right2left'> "
diff --git a/gui/themes/modern.stx b/gui/themes/modern.stx
index 3551b637df..cf022960bb 100644
--- a/gui/themes/modern.stx
+++ b/gui/themes/modern.stx
@@ -456,6 +456,11 @@
<def var = 'Widget.Size' value = '32' />
<def var = 'Line.Height' value = '16' />
<def var = 'Font.Height' value = '16' />
+ <def var = 'TabLabelWidth' value = '110' />
+
+ <def var = 'WidgetSize' value = 'kBigWidgetSize' />
+
+ <def resolution = '320xY' var = 'WidgetSize' value = 'kNormalWidgetSize' />
<def var = 'Padding.Bottom' value = '16' />
<def var = 'Padding.Left' value = '16' />
@@ -465,6 +470,9 @@
<def var = 'ListWidget.hlLeftPadding' value = '0'/>
<def var = 'ListWidget.hlRightPadding' value = '16'/>
<def var = 'PopUpWidget.labelSpacing' value = '10' />
+
+ <def var = 'ShowLauncherLogo' value = '1'/>
+ <def resolution = '320xY' var = 'ShowLauncherLogo' value = '0'/>
<widget name = 'OptionsLabel'
size = '110, Globals.Line.Height'
@@ -472,9 +480,16 @@
<widget name = 'SmallLabel'
size = '24, Globals.Line.Height'
/>
+
<widget name = 'Button'
- size = '108, 24'
+ size = 'kBigButtonWidth, kBigButtonHeight'
/>
+ <widget resolution = '320xY'
+ name = 'Button'
+ size = 'kButtonWidth, kButtonHeight'
+ />
+
+
<widget name = 'Slider'
size = '128, 18'
/>
@@ -552,6 +567,43 @@
</layout>
</dialog>
+ <dialog resolution = '320xY' name = 'Launcher' overlays = 'screen'>
+ <layout type = 'vertical' center = 'true' padding = '8, 8, 8, 8'>
+ <widget name = 'Version'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'GameList' width = '304' height = '120'/>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6'>
+ <widget name = 'AddGameButton'
+ width = '95'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'EditGameButton'
+ width = '95'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'RemoveGameButton'
+ width = '95'
+ height = 'Globals.Button.Height'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0'>
+ <widget name = 'QuitButton'
+ type = 'Button'
+ />
+ <widget name = 'AboutButton'
+ type = 'Button'
+ />
+ <widget name = 'OptionsButton'
+ type = 'Button'
+ />
+ <widget name = 'StartButton'
+ type = 'Button'
+ />
+ </layout>
+ </layout>
+ </dialog>
+
<dialog name = 'Browser' overlays = 'Dialog.Launcher.GameList' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 8, 8' direction = 'bottom2top'>
<layout type = 'horizontal' padding = '0, 0, 16, 0' direction = 'right2left'>
@@ -574,8 +626,7 @@
height = 'Globals.Line.Height'
/>
</layout>
- </dialog>
-
+ </dialog>
<dialog name = 'GlobalOptions' overlays = 'Dialog.Launcher.GameList' shading = 'dim'>
<layout type = 'vertical' padding = '0, 0, 0, 0' direction = 'bottom2top'>
@@ -592,6 +643,8 @@
</layout>
</dialog>
+
+
<dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
<widget name = 'grModePopup'
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 1b3fc8c055..0320aa1f04 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -183,10 +183,7 @@ StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name,
_type = kStaticTextWidget;
_label = text;
- _align = (Graphics::TextAlignment)g_gui.evaluator()->getVar(name + ".align");
-
- if (_align == (int)EVAL_UNDEF_VAR)
- _align = kTextAlignLeft;
+ _align = (Graphics::TextAlignment)g_gui.xmlEval()->getVar(name + ".Align", kTextAlignLeft);
}
void StaticTextWidget::setValue(int value) {