Game Development Community

How to minimize game window while pressing alt ctrl delete keys?

by mohanmartin · in General Discussion · 01/20/2009 (10:13 pm) · 1 replies

Is this possible to minimize game window from full screen while pressing "alt ctrl delete" or "alt tab"?

keybindings..
moveMap.bind("keyboard", "alt tab", "onWindowFocusChange(%isFocused)");
 moveMap.bind("keyboard", "alt ctrl delete", "onWindowFocusChange(%isFocused)");

i write the code for window focus change while pressing 'alt tab' keys, the game window inactive, but it is not minimized. my coding is..

function onWindowFocusChange(%isFocused)
{
   // pause game
    if (!%isFocused)
        pauseWindow(1);
        
   // unpause game
    else
        pauseWindow(0);
}

function pauseWindow(%state)
{      
    %scene = Scenewindow2d.getSceneGraph();       
    %result = (%state == 1) ? true : false;
    
    // pause game (only if the player hasn't paused the game)
    if (!$pauseingame)
    {
      %scene.setScenePause( %result ); 
      $paused = %state;
      echo("Paused:" @ %result);        
    }
    
    // turn music off when paused
    if (%state)
    {
      alxSetChannelVolume($GuiAudioType, 0);
      echo("Music Off");    
    }
    
    // turn music on when upased (and music option on)
    else
      alxSetChannelVolume($GuiAudioType, 1);
      echo("Music On");
}

#1
01/20/2009 (10:23 pm)
Im not sure you can override kernel level key functions from script.

Try some simple key binding to test your functions, if they work but not "alt tab" or "alt ctrl delete" then that would sorta prove what i said.
Im sure you can change "alt tab" and "alt ctrl delete" in the C'code this would be something Google could help you with.