fix bugs added in r9532, constructor delegation doesn't work in C++

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9692 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
red-skull 2011-09-01 00:41:45 +00:00
parent 5bd414e546
commit a6dda46ad3
2 changed files with 17 additions and 8 deletions

View File

@ -30,6 +30,21 @@ using namespace GUIEngine;
MessageDialog::MessageDialog(irr::core::stringw msg, MessageDialogType type, IConfirmDialogListener* listener, bool own_listener) :
ModalDialog(0.6f, 0.6f)
{
doInit(msg, type, listener, own_listener);
}
// ------------------------------------------------------------------------------------------------------
MessageDialog::MessageDialog(irr::core::stringw msg) :
ModalDialog(0.6f, 0.6f)
{
doInit(msg, MessageDialog::MESSAGE_DIALOG_OK, NULL, false);
}
// ------------------------------------------------------------------------------------------------------
void MessageDialog::doInit(irr::core::stringw msg, MessageDialogType type, IConfirmDialogListener* listener, bool own_listener)
{
loadFromFile("confirm_dialog.stkgui");
m_listener = listener;
@ -50,13 +65,6 @@ MessageDialog::MessageDialog(irr::core::stringw msg, MessageDialogType type, ICo
}
}
// ------------------------------------------------------------------------------------------------------
MessageDialog::MessageDialog(irr::core::stringw msg) :
ModalDialog(0.6f, 0.6f)
{
MessageDialog(msg, MessageDialog::MESSAGE_DIALOG_OK, NULL, false);
}
// ------------------------------------------------------------------------------------------------------

View File

@ -59,7 +59,8 @@ private:
IConfirmDialogListener* m_listener;
bool m_own_listener;
void doInit(irr::core::stringw msg, MessageDialogType type, IConfirmDialogListener* listener, bool own_listener);
public:
/**