Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Game.Reset doesn't close response box  (Read 2707 times)

0 Members and 1 Guest are viewing this topic.

deviltry

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
    • View Profile
Game.Reset doesn't close response box
« on: November 05, 2008, 09:51:36 PM »

Hello,

I've got a problem with the response box.
When pressing ESC in the game the menu opens. There I can start a totally new game. I use the Game.Reset() comment to make sure, a new game won't be messed up by some already changed variables etc. I thought it resets everything back to starting position.
Now when I press ESC while the response box is open, the same should be possible. But the response box will stay open when I start a new game. When selecting one of the responses the game crashes of course.

I thought maybe the response box stays open because the DlgBranch hasen't been closed.
I tried to ask for any open DlgBranch and end it by something like this:

Code: [Select]
var res = Game.GetCurrentDlgBranch();
if(res != null) Game.EndDlgBranch(res);

But it doesn't seem to do anything.

I also tried to close the response box manually. Window.Close() and Window.Visible = false hide it, but it still seems to be exclusive for I can't interact with the game anymore. Game.UnloadObject() doesn't help either.

The only way I found to avoid this problem is not allowing to open the menu while the response box is visible. But that's a quite ugly solution imo :(

Please help!  ???
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Game.Reset doesn't close response box
« Reply #1 on: November 06, 2008, 08:41:59 AM »

It's ugly, but I think it's the only way at the moment.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

deviltry

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
    • View Profile
Re: Game.Reset doesn't close response box
« Reply #2 on: November 06, 2008, 10:29:32 AM »

Ok, thanks. At least it's not hard to implement :)
Logged
 

Page created in 0.031 seconds with 19 queries.