aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2006-03-24 18:10:41 +0000
committerEugene Sandulenko2006-03-24 18:10:41 +0000
commit7569f796ec0a0cee5b19440e9dfe4c35696c8e60 (patch)
treea3608212289a748bff0f79319da7d416cfc541db
parentf433bdb566111af3d6570a5bff1e4c381f10e1d0 (diff)
downloadscummvm-rg350-7569f796ec0a0cee5b19440e9dfe4c35696c8e60.tar.gz
scummvm-rg350-7569f796ec0a0cee5b19440e9dfe4c35696c8e60.tar.bz2
scummvm-rg350-7569f796ec0a0cee5b19440e9dfe4c35696c8e60.zip
Fix crash in Options dialog in 320xY mode. Shadow was drawn off-screen
svn-id: r21438
-rw-r--r--gui/newgui.cpp8
-rw-r--r--gui/theme-config.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index f3ba58bab7..18a3c11784 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -70,14 +70,14 @@ GuiObject::GuiObject(Common::String name) : _firstWidget(0) {
error("Widget <%s> has x < 0", name.c_str());
if(_x >= g_system->getOverlayWidth())
error("Widget <%s> has x > %d", name.c_str(), g_system->getOverlayWidth());
- if(_x + _w >= g_system->getOverlayWidth())
- error("Widget <%s> has x + w > %d", name.c_str(), g_system->getOverlayWidth());
+ if(_x + _w > g_system->getOverlayWidth())
+ error("Widget <%s> has x + w > %d (%d)", name.c_str(), g_system->getOverlayWidth(), _x + _w);
if(_y < 0)
error("Widget <%s> has y < 0", name.c_str());
if(_y >= g_system->getOverlayWidth())
error("Widget <%s> has y > %d", name.c_str(), g_system->getOverlayHeight());
- if(_y + _h >= g_system->getOverlayWidth())
- error("Widget <%s> has y + h > %d", name.c_str(), g_system->getOverlayHeight());
+ if(_y + _h > g_system->getOverlayWidth())
+ error("Widget <%s> has y + h > %d (%d)", name.c_str(), g_system->getOverlayHeight(), _y + _h);
_name = name;
}
diff --git a/gui/theme-config.cpp b/gui/theme-config.cpp
index 893aa6369c..22c641bb93 100644
--- a/gui/theme-config.cpp
+++ b/gui/theme-config.cpp
@@ -35,8 +35,8 @@ const char *Theme::_defaultConfigINI =
"def_kLineHeight=12\n"
"def_kFontHeight=10\n"
"def_globOptionsW=(w - 2 * 10)\n"
-"def_globOptionsH=(h - 1 * 40)\n"
-"def_gameOptionsH=(h - 2 * 30)\n"
+"def_globOptionsH=(h - 30)\n"
+"def_gameOptionsH=(h - 30)\n"
"def_gameOptionsLabelWidth=60\n"
"def_tabPopupsLabelW=100\n"
"def_aboutXOff=3\n"
@@ -116,7 +116,7 @@ const char *Theme::_defaultConfigINI =
"launcher_list=hBorder (kLineHeight + 16) (w - 2 * hBorder) (top - kLineHeight - 20)\n"
"\n"
"### global options\n"
-"globaloptions=10 40 globOptionsW globOptionsH\n"
+"globaloptions=10 20 globOptionsW globOptionsH\n"
"set_parent=globaloptions\n"
"vBorder=5\n"
"globaloptions_tabwidget=0 vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)\n"
@@ -149,7 +149,7 @@ const char *Theme::_defaultConfigINI =
"globaloptions_ok=(prev.x2 + 10) prev.y prev.w prev.h\n"
"\n"
"### game options\n"
-"gameoptions=10 40 (w - 2 * 10) gameOptionsH\n"
+"gameoptions=10 20 (w - 2 * 10) gameOptionsH\n"
"set_parent=gameoptions\n"
"vBorder=5\n"
"gox=5\n"