aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/ThemeEval.cpp')
-rw-r--r--gui/ThemeEval.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp
index e13ccc0176..e2c34d8128 100644
--- a/gui/ThemeEval.cpp
+++ b/gui/ThemeEval.cpp
@@ -157,15 +157,26 @@ void ThemeEval::addWidget(const Common::String &name, int w, int h) {
_curLayout.top()->addChild(widget);
}
-void ThemeEval::addDialog(const Common::String &name) {
+void ThemeEval::addDialog(const Common::String &name, const Common::String &overlays) {
ThemeLayout *layout = new ThemeLayoutMain();
_layouts[name] = layout;
+
+ int16 x, y;
+ uint16 w, h;
- layout->setX(0);
- layout->setY(0);
- layout->setWidth(g_system->getOverlayWidth());
- layout->setHeight(g_system->getOverlayHeight());
+ if (overlays == "screen" || overlays.empty()) {
+ x = y = 0;
+ w = g_system->getOverlayWidth();
+ h = g_system->getOverlayHeight();
+ } else if (!getWidgetData(overlays, x, y, w, h)) {
+ error("Error when loading dialog position for '%s'", overlays.c_str());
+ }
+ layout->setX(x);
+ layout->setY(y);
+ layout->setWidth(w);
+ layout->setHeight(h);
+
layout->setPadding(
getVar("Globals.Padding.Left", 0),
getVar("Globals.Padding.Right", 0),