[Scummvm-cvs-logs] SF.net SVN: scummvm: [22523] scummvm/trunk/engines/scumm
sev at users.sourceforge.net
sev at users.sourceforge.net
Thu May 18 12:38:05 CEST 2006
Revision: 22523
Author: sev
Date: 2006-05-18 12:37:38 -0700 (Thu, 18 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22523&view=rev
Log Message:
-----------
Plug memory leak
Modified Paths:
--------------
scummvm/trunk/engines/scumm/dialogs.cpp
scummvm/trunk/engines/scumm/dialogs.h
Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp 2006-05-18 16:44:44 UTC (rev 22522)
+++ scummvm/trunk/engines/scumm/dialogs.cpp 2006-05-18 19:37:38 UTC (rev 22523)
@@ -820,6 +820,9 @@
void InfoDialog::setInfoText(const String& message) {
_message = message;
+ // Width and height are dummy
+ _text = new StaticTextWidget(this, 4, 4, 10, 10, _message, kTextAlignCenter);
+
handleScreenChanged();
}
@@ -835,7 +838,7 @@
_x = (screenW - width) / 2;
_y = (screenH - height) / 2;
- new StaticTextWidget(this, 4, 4, _w - 8, _h, _message, kTextAlignCenter);
+ _text->setSize(_w - 8, _h);
}
const Common::String InfoDialog::queryResString(int stringno) {
Modified: scummvm/trunk/engines/scumm/dialogs.h
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.h 2006-05-18 16:44:44 UTC (rev 22522)
+++ scummvm/trunk/engines/scumm/dialogs.h 2006-05-18 19:37:38 UTC (rev 22523)
@@ -154,6 +154,7 @@
protected:
ScummEngine *_vm;
String _message;
+ GUI::StaticTextWidget *_text;
public:
// arbitrary message
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