[solved]How to use Message input

leonardoaraujo.santos

30-08-2008 04:48:55

Hi guys I'm using the following code to display an Message box with MyGUI

MyGUI::MessagePtr pGUIMsg = MyGUI::Message::createMessage(Ogre::String("Atencao"),Ogre::String("Conectando ao servidor"),true,MyGUI::Message::IconWarning | MyGUI::Message::Ok);


My questions is how can I know that the "Ok" button has been pressed and then continue my tasks.... (The Idea is to wait the Ok button to be pressed)

Thanks

my.name

30-08-2008 17:35:43


MyGUI::MessagePtr pGUIMsg = MyGUI::Message::createMessage(Ogre::String("Atencao"),Ogre::String("Conectando ao servidor"),true,MyGUI::Message::IconWarning | MyGUI::Message::Ok);

pGUIMsg->eventMessageBoxEnd = MyGUI::newDelegate(this, &YourClass::notifyMessageBoxEnd);

void YourClass::notifyMessageBoxEnd(MyGUI::WidgetPtr _sender, MyGUI::Message::ViewInfo _button)
{
if (_button == MyGUI::Message::Ok) {
// action
}
}

leonardoaraujo.santos

31-08-2008 16:51:14

Thanks my.name I'm editing this post to [solved]