diff options
| author | Vicent Marti | 2008-08-05 23:58:45 +0000 | 
|---|---|---|
| committer | Vicent Marti | 2008-08-05 23:58:45 +0000 | 
| commit | 4256c357912bd9c2b554c22f09a2d0304e9de9a2 (patch) | |
| tree | 362c9e4b58edd3951bc3822e87c135898b77bbd3 /gui/ThemeEval.cpp | |
| parent | eb3d163439455fb941be0de73c1b3d28f3414c20 (diff) | |
| download | scummvm-rg350-4256c357912bd9c2b554c22f09a2d0304e9de9a2.tar.gz scummvm-rg350-4256c357912bd9c2b554c22f09a2d0304e9de9a2.tar.bz2 scummvm-rg350-4256c357912bd9c2b554c22f09a2d0304e9de9a2.zip  | |
Options menu layout parsing, featuring the brand new FATPOPUPS.
svn-id: r33651
Diffstat (limited to 'gui/ThemeEval.cpp')
| -rw-r--r-- | gui/ThemeEval.cpp | 21 | 
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),  | 
