cleanup
svn-id: r35020
This commit is contained in:
parent
710084dde6
commit
42533c2354
2 changed files with 2 additions and 12 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue