Closing a MessageBoxOK from code
by Mark Brown · in Torque Game Engine · 01/09/2009 (6:25 am) · 2 replies
Can I close a MessageBoxOK from the code rather than by mouse click. I have bound the "h" key to give the player a hint about what direction to go. It would be nice to press the "h" key a second time to make the hint go away.
About the author
#2
I solved it this way:
if ( $hint_showing )
{
// Turn off hint
messageCallback(MessageBoxOKDlg,MessageBoxOKDlg.callback);
$hint_showing = 0;
return;
}
$hint_showing = 1;
01/09/2009 (5:25 pm)
Your solution works too. Many thanks!I solved it this way:
if ( $hint_showing )
{
// Turn off hint
messageCallback(MessageBoxOKDlg,MessageBoxOKDlg.callback);
$hint_showing = 0;
return;
}
$hint_showing = 1;
Torque 3D Owner Chris Cain