Change default behavior of MessageDialog confirm button to close the dialog

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9545 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
coug36
2011-08-17 01:57:48 +00:00
parent 6518906b60
commit 2824225df2
2 changed files with 2 additions and 7 deletions

View File

@@ -100,8 +100,3 @@ GUIEngine::EventPropagation MessageDialog::processEvent(const std::string& event
}
// ------------------------------------------------------------------------------------------------------
void MessageDialog::IConfirmDialogListener::onCancel()
{
ModalDialog::dismiss();
}

View File

@@ -44,13 +44,13 @@ public:
* \note The dialog is not closed automatically, close it in the callback if this
* behavior is desired.
*/
virtual void onConfirm() {};
virtual void onConfirm() { ModalDialog::dismiss(); };
/** \brief Implement to be notified of dialog cancelled.
* \note The default implementation is to close the modal dialog, but you may override
* this method to change the behavior.
*/
virtual void onCancel();
virtual void onCancel() { ModalDialog::dismiss(); };
};
enum MessageDialogType { MESSAGE_DIALOG_OK, MESSAGE_DIALOG_CONFIRM };