Gui Freezing on screen problem

Started by Scummbuddy, Wed 18/06/2003 16:36:10

Previous topic - Next topic

Scummbuddy

My Gui is supposed to pop up, asking if the user would like to [automatically] win.

It pops up just fine, but then it freezes. No buttons will respond, and I can't quit the game, so I have to Crtl Alt Del the thing.


Here it is:


under
function on_key_press(int keycode)
I have:
if (keycode==23) GUIOn(WIN); // Ctrl + W -- Automatically win game
if (IsGUIOn(WIN))
  {
     if (keycode==89)
     {
        NewRoom(1);//winning room
        GUIOff(WIN);
     }
     if (keycode==78) GUIOff(WIN);
  }


I shouldnt have to move the last nested function to rep.execute function, do I?
I'm using the beta version 2.56, by the way.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

CiacioZ

Hi to all, unfortunately I cant download the templates so could someone post them to me by email?

My address is s.casotti@fastpiu.it

Greetings CiacioZ

Scummbuddy

Wow... thats... really helpful.  Thank you for that insight....

Seriously... good luck getting your downloads... If someone does send them, reply with a post so everyone doesn't flood his email... but we'd need to know which ones he would like.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Proskrito

if the gui is in popup mode, do you have a part in the on_key_press at the beggining that reads "if (IsGamePaused()==1) keycode==0"??
if you have your code below that, try putting it upon that. Its the only think i can think of :-\

CiacioZ

Quote from: Scummbuddy on Thu 19/06/2003 08:22:35
Seriously... good luck getting your downloads... If someone does send them, reply with a post so everyone doesn't flood his email... but we'd need to know which ones he would like.

I like to take a look to all the lucas template so if someone could send them to me, thanks a lot again ;)

CiacioZ

Someone notice to me that this is not the right place to reply about the MI2 templates...sorry I read the right thread but do a terrible mistake when I was trying to reply so apologise me.

Sorry for the mistake, I'll take more attention in the future.

Greetings CiacioZ

Scummbuddy

Proskrito saves the day.  I hate how where you place the code matters, even though they are not nested functions.  I've had this problem before, but not the same way, so I didnt try it.  Thanks again.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SMF spam blocked by CleanTalk