aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2008-11-12 13:01:21 +0000
committerMax Horn2008-11-12 13:01:21 +0000
commit42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc (patch)
tree6abf396784358dbc787d140c79d783e4131b86ee
parent710084dde6236bb09c6f9c75538d5ed5f79b067d (diff)
downloadscummvm-rg350-42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc.tar.gz
scummvm-rg350-42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc.tar.bz2
scummvm-rg350-42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc.zip
cleanup
svn-id: r35020
-rw-r--r--gui/message.cpp11
-rw-r--r--gui/message.h3
2 files changed, 2 insertions, 12 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;
diff --git a/gui/message.h b/gui/message.h
index cb27a615c3..912e3b0785 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -44,9 +44,6 @@ public:
MessageDialog(const Common::String &message, const char *defaultButton = "OK", const char *altButton = 0);
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
-
-protected:
- ButtonWidget *addButton(GuiObject *boss, int x, int y, const Common::String &label, uint32 cmd, char hotkey);
};
/**