[Scummvm-cvs-logs] SF.net SVN: scummvm:[34882] scummvm/trunk/gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Nov 3 17:42:23 CET 2008
Revision: 34882
http://scummvm.svn.sourceforge.net/scummvm/?rev=34882&view=rev
Author: fingolfin
Date: 2008-11-03 16:42:23 +0000 (Mon, 03 Nov 2008)
Log Message:
-----------
Moved GuiObject::reflowLayout from newgui.cpp to object.cpp
Modified Paths:
--------------
scummvm/trunk/gui/newgui.cpp
scummvm/trunk/gui/object.cpp
Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp 2008-11-03 16:38:47 UTC (rev 34881)
+++ scummvm/trunk/gui/newgui.cpp 2008-11-03 16:42:23 UTC (rev 34882)
@@ -54,27 +54,6 @@
kCursorAnimateDelay = 250
};
-void GuiObject::reflowLayout() {
- if (!_name.empty()) {
- if (!g_gui.xmlEval()->getWidgetData(_name, _x, _y, _w, _h)) {
- error("Could not load widget position for '%s'", _name.c_str());
- }
-
- if (_x < 0)
- error("Widget <%s> has x < 0: %d", _name.c_str(), _x);
- 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 (%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->getOverlayHeight())
- error("Widget <%s> has y > %d", _name.c_str(), g_system->getOverlayHeight());
- if (_y + _h > g_system->getOverlayHeight())
- error("Widget <%s> has y + h > %d (%d)", _name.c_str(), g_system->getOverlayHeight(), _y + _h);
- }
-}
-
// Constructor
NewGui::NewGui() : _redrawStatus(kRedrawDisabled),
_stateIsSaved(false), _cursorAnimateCounter(0), _cursorAnimateTimer(0) {
Modified: scummvm/trunk/gui/object.cpp
===================================================================
--- scummvm/trunk/gui/object.cpp 2008-11-03 16:38:47 UTC (rev 34881)
+++ scummvm/trunk/gui/object.cpp 2008-11-03 16:42:23 UTC (rev 34882)
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "gui/object.h"
#include "gui/widget.h"
+#include "gui/newgui.h"
namespace GUI {
@@ -41,5 +42,25 @@
return g_system->getMillis();
}
+void GuiObject::reflowLayout() {
+ if (!_name.empty()) {
+ if (!g_gui.xmlEval()->getWidgetData(_name, _x, _y, _w, _h)) {
+ error("Could not load widget position for '%s'", _name.c_str());
+ }
+ if (_x < 0)
+ error("Widget <%s> has x < 0: %d", _name.c_str(), _x);
+ 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 (%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->getOverlayHeight())
+ error("Widget <%s> has y > %d", _name.c_str(), g_system->getOverlayHeight());
+ if (_y + _h > g_system->getOverlayHeight())
+ error("Widget <%s> has y + h > %d (%d)", _name.c_str(), g_system->getOverlayHeight(), _y + _h);
+ }
+}
+
} // End of namespace GUI
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list