QuickBattleMap.bindcmd( keyboard, $Keys_CaptureCity, "LaunchCaptureCity();", "" );
QuickBattleMap.bindcmd( keyboard, $keys_RotateCamera, "LaunchRotateCamera();", "" );
QuickBattleMap.bindcmd( keyboard, $keys_Options, "LaunchOptions();", "" );
QuickBattleMap.bindcmd( keyboard, $keys_Pause, "PauseGame();", "" );
QuickBattleMap.bindcmd( keyboard, $Keys_AttackCrew, "CustomAttackOrder(attackcrew);", "" );
QuickBattleMap.bindcmd( keyboard, $keys_AttackEngine, "CustomAttackOrder(attackengine);", "" );
QuickBattleMap.bindcmd( keyboard, $Keys_AttackGasTank, "CustomAttackOrder(attackgastank);", "" );
QuickBattleMap.bindcmd( keyboard, $Keys_AttackTires, "CustomAttackOrder(attacktires);", "" );
QuickBattleMap.bindcmd( keyboard, $Keys_AttackWeapon, "CustomAttackOrder(attackweapon);", "" );
QuickBattleMap.bindcmd( keyboard, $Keys_SelectTarget, "CustomAttackOrder(attackvehicle);", "" );
QuickBattleMap.bindcmd( keyboard, $Keys_BoardVehicle, "CustomAttackOrder(BoardVehicle);", "" );
QuickBattleMap.bindcmd( keyboard, $keys_RamVehicle, "CustomAttackOrder(RamVehicle);", "" );
QuickBattleMap.bindcmd( keyboard, $keys_Brake, "DecreasePlayerSpeed();", "" );
QuickBattleMap.bindcmd( keyboard, $keys_Accelerate, "IncreasePlayerSpeed();", "" );
QuickBattleMap.bindcmd(keyboard, $keys_QuitGame, "ExitGame();", "");

QuickBattleMap.bindcmd( keyboard, $keys_TurnLeft, "TurnPlayerLeft();", "" );
QuickBattleMap.bindcmd( keyboard, $Keys_TurnRight, "TurnPlayerRight();", "" );
QuickBattleMap.bindcmd( keyboard, $keys_Move, "PlayerMove();", "" );
QuickBattleMap.bindcmd( keyboard, $keys_Attack, "PlayerAttack();", "" );

if($turnbased $= true)
   QuickBattleMap.bind(mouse, "zaxis", "MouseWheelTB");
else
   QuickBattleMap.bind(mouse, "zaxis", "MouseWheel");

function ExitGame()
{
   if($GameStarted $= true)
      canvas.PushDialog(QuitGame);
}

function PauseGame()
{
   $pause = sg.getScenePause();
   
   if($pause $= 1)
   {
      sg.setScenePause(false);
      $pause = "";         
      pausetext.visible = false;
   }
   else
   {
      sg.setScenePause(true);
      $pause = 1;
      
      // place the pause text on screen
      
      %pos = Screen2D.getCurrentCameraPosition();
      
      pausetext.visible = true;
      pausetext.SetPosition(%pos);
   }
}

function LaunchRotateCamera()
{
   RotateCamera();   
}

function LaunchOptions()
{
   canvas.pushdialog(Options);   
}
