Make InfoDialog::setInfoText a bit more useful, by making it public & reusable
svn-id: r27050
This commit is contained in:
parent
8ca6751b21
commit
f85871b1fc
2 changed files with 13 additions and 5 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue