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:
@@ -100,8 +100,3 @@ GUIEngine::EventPropagation MessageDialog::processEvent(const std::string& event
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
void MessageDialog::IConfirmDialogListener::onCancel()
|
||||
{
|
||||
ModalDialog::dismiss();
|
||||
}
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user