gui->update(dt);
gui->DelCtrl(id);
gui->Leave(); // lock (leave) the gui first
gui->SetFocus(1); // reset the focus to a new id
gui->Enter(); // unlock (enter) the gui
[/SOURCE]
Another HGE question [solved]
OK, I realize not that many people use this engine (I'm starting to regret it too). I appreciate it if someone who has experience can take a look at this problem.
Using version 1.7, every time I delete a gui control, the game crashes the next time gui->update() is called. I've been working with this damn thing for a couple of days, so anyone who can help, please drop me a line.
** edit: To be a little more specific, it only crashes (with a c00000005 exception) when I delete a ctrl that was the last clicked. SetFocus does nothing.
** edit: Since this isn't covered anywhere in the documentation, the solution is:
[Edited by - argonaut on June 5, 2007 10:38:06 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement