Another HGE question [solved]

Started by
-1 comments, last by argonaut 16 years, 10 months ago
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:


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]
[Edited by - argonaut on June 5, 2007 10:38:06 PM]
~Argonaut________________________________Why "~Argonaut"? It's all just a mathematical expression denoting a close approximation of "Argonaut", which is irrational and can't be precisely defined.

This topic is closed to new replies.

Advertisement