diff options
author | Max Horn | 2007-06-02 12:01:09 +0000 |
---|---|---|
committer | Max Horn | 2007-06-02 12:01:09 +0000 |
commit | f85871b1fc9540c77b43d8ed200059e7d31948be (patch) | |
tree | 4d6dd5d68422dbcbb4af5595468d69e6229b756d /engines/scumm/dialogs.cpp | |
parent | 8ca6751b2181fbc24a7fe0e56086d80c0700b638 (diff) | |
download | scummvm-rg350-f85871b1fc9540c77b43d8ed200059e7d31948be.tar.gz scummvm-rg350-f85871b1fc9540c77b43d8ed200059e7d31948be.tar.bz2 scummvm-rg350-f85871b1fc9540c77b43d8ed200059e7d31948be.zip |
Make InfoDialog::setInfoText a bit more useful, by making it public & reusable
svn-id: r27050
Diffstat (limited to 'engines/scumm/dialogs.cpp')
-rw-r--r-- | engines/scumm/dialogs.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 15c22c2bed..7541edd0b4 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -749,21 +749,28 @@ void HelpDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { InfoDialog::InfoDialog(ScummEngine *scumm, int res) : ScummDialog("scummDummyDialog"), _vm(scumm) { // dummy x and w - setInfoText(queryResString(res)); + + _message = queryResString(res); + + // Width and height are dummy + _text = new StaticTextWidget(this, 4, 4, 10, 10, _message, kTextAlignCenter); } InfoDialog::InfoDialog(ScummEngine *scumm, const String& message) : ScummDialog("scummDummyDialog"), _vm(scumm) { // dummy x and w - setInfoText(message); -} -void InfoDialog::setInfoText(const String& message) { _message = message; // Width and height are dummy _text = new StaticTextWidget(this, 4, 4, 10, 10, _message, kTextAlignCenter); } +void InfoDialog::setInfoText(const String& message) { + _message = message; + _text->setLabel(_message); + //reflowLayout(); // FIXME: Should we call this here? Depends on the usage patterns, I guess... +} + void InfoDialog::reflowLayout() { const int screenW = g_system->getOverlayWidth(); const int screenH = g_system->getOverlayHeight(); |