Game Development Community

Removing a dialog from screen

by Ali Khan · in Technical Issues · 08/15/2006 (9:37 pm) · 0 replies

Hi all,

I have created a popup dialog and I display it during game play by using script function Canvas.pushDialog(DialogName); This created the dialog fine, released the mouse.

To close it I call Canvas.popDialog(DialogName); again from script. This also works fine and I return to the game just as before.

The problem is now I need to remove the dialog from screen from the C++ code. When I call

Canvas->popDialogControl(DialogName);

from C++ I get a crash some where in the control rendering code of canvas. The error comes when the canvas is painted in the next loop.

I have tried copying all the code from the console method popDialog, as implemented in the GuiCanvas class.
But same results.

Please anyone has any idea what I might be doing wrong here.

Thanks.