aboutsummaryrefslogtreecommitdiff
path: root/gui/message.cpp
diff options
context:
space:
mode:
authorMax Horn2008-11-12 13:01:21 +0000
committerMax Horn2008-11-12 13:01:21 +0000
commit42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc (patch)
tree6abf396784358dbc787d140c79d783e4131b86ee /gui/message.cpp
parent710084dde6236bb09c6f9c75538d5ed5f79b067d (diff)
downloadscummvm-rg350-42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc.tar.gz
scummvm-rg350-42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc.tar.bz2
scummvm-rg350-42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc.zip
cleanup
svn-id: r35020
Diffstat (limited to 'gui/message.cpp')
-rw-r--r--gui/message.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/gui/message.cpp b/gui/message.cpp
index 3ac3cef3cf..1d71224d13 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -89,10 +89,10 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
}
if (defaultButton)
- addButton(this, okButtonPos, _h - buttonHeight - 8, defaultButton, kOkCmd, Common::ASCII_RETURN); // Confirm dialog
+ new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, defaultButton, kOkCmd, Common::ASCII_RETURN); // Confirm dialog
if (altButton)
- addButton(this, cancelButtonPos, _h - buttonHeight - 8, altButton, kCancelCmd, Common::ASCII_ESCAPE); // Cancel dialog
+ new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, kCancelCmd, Common::ASCII_ESCAPE); // Cancel dialog
}
void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
@@ -108,13 +108,6 @@ void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
}
}
-ButtonWidget *MessageDialog::addButton(GuiObject *boss, int x, int y, const Common::String &label, uint32 cmd, char hotkey) {
- int w = g_gui.xmlEval()->getVar("Globals.Button.Width", 0);
- int h = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
-
- return new ButtonWidget(boss, x, y, w, h, label, cmd, hotkey);
-}
-
TimedMessageDialog::TimedMessageDialog(const Common::String &message, uint32 duration)
: MessageDialog(message, 0, 0) {
_timer = getMillis() + duration;