MODULE: DoubleClick + KeyListener: detect double clicks and more

Started by Crimson Wizard, Wed 10/02/2016 01:39:17

Previous topic - Next topic

rongel

Quote from: Crimson Wizard on Fri 29/01/2021 10:05:13
But with Display command it's different, in AGS key presses won't be registered at all while Display is active on screen. What you may probably do is to set special key to skip Display right before starting one and set it back to your normal defaults right after.

Thanks for the quick answer! Yes, I've been thinking to use a GUI if the Display command causes troubles.

I tried using your code, but got an error "skip_speech_specific_key' is not a public member of 'GameState'". I'm not sure if I used it correctly...
Dreams in the Witch House on Steam & GOG

Crimson Wizard

Quote from: rongel on Fri 29/01/2021 10:24:24
I tried using your code, but got an error "skip_speech_specific_key' is not a public member of 'GameState'". I'm not sure if I used it correctly...

Oh sorry, I got confused, this variable was turned into Speech.SkipKey property, but it's not applied to Display anyway, so won't be useful here.

rongel

Ok, no problem. I tried to use this when pressing spacebar, but got nowhere:
   
Code: ags

      int old_skip_display = game.skip_display;
      int old_skip_key = Speech.SkipKey;
    
      game.skip_display = eSkipKey;
      Speech.SkipKey = eKeyA;
    
      Display("GAME PAUSED %s",
      "[[Press any key to continue");
      game.skip_display = old_skip_display;
      Speech.SkipKey = old_skip_key;     


It doesn't give any errors, but I can't see any effect either. I'm probably using this wrong! I may have to change the pause system, so that it uses a GUI. Just annoying because the simple Display works almost perfect.
Dreams in the Witch House on Steam & GOG

Crimson Wizard

Like I said, Speech.SkipKey does not apply to Display (it applies only to speech). So this method won't work.

Display have many problems in AGS, notably it blocks every script event, even repeatedly_execute_always. This is why it is practically impossible to customize its behavior.

rongel

Ok, thanks for the clarification! I know now not to spend anymore time fighting this issue, and switch to Gui.

Dreams in the Witch House on Steam & GOG

SMF spam blocked by CleanTalk