function ExitDlg::onNo(%this)
{
   Canvas.popDialog(ExitDlg);
   if(isObject(SceneGui)) 
   {
      SceneGui.resumeHOGame();
   }
   
   if((MazeMinigame.isPlaying && MazeMinigame.gameMode $= "Dragger") || InsectMinigame.isPlaying || PunchMinigame.isPlaying)
   {
      lockMouse(true);
      Canvas.hideCursor();
   } 
   
   if(isObject(WorldMapGui)) 
   {
      for(%i=0; %i<100; %i++)
      { 
         Canvas.hideCursor(); 
      } 
   }
   
   resumeSchedulesLCA("MinigameParticle");
   resumeSchedulesLCA("Minigame");
   
   $OnExitDlg = false;   
}

function ExitDlg::onYes(%this)
{
   if(isObject(SceneGui))
   {
      SceneGui.resumeHOGame();
   }
   
   Canvas.popDialog(ExitDlg);
   
   quit();   
   
   $OnExitDlg = false;
}