aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
};
/**