From 42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 12 Nov 2008 13:01:21 +0000 Subject: cleanup svn-id: r35020 --- gui/message.cpp | 11 ++--------- gui/message.h | 3 --- 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); }; /** -- cgit v1.2.3