# HG changeset patch # User Drew Gottlieb # Date 1354727527 -3600 # Node ID d3dc08500fc02308c6a221d4d7f942842cc4740d # Parent 67105120662cac478350330caafac99422610dec GCI2012: Remove Quit Prompt On Mouse Click diff -r 67105120662c -r d3dc08500fc0 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Tue Dec 04 10:17:16 2012 +0100 +++ b/hedgewars/hwengine.pas Wed Dec 05 18:12:07 2012 +0100 @@ -32,7 +32,7 @@ uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uInputHandler , uSound, uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uAILandMarks, uLandTexture, uCollisions , SysUtils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted - , uPhysFSLayer + , uPhysFSLayer, uCursor {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF} {$IFDEF USE_TOUCH_INTERFACE}, uTouch {$ENDIF} {$IFDEF ANDROID}, GLUnit{$ENDIF} @@ -217,7 +217,13 @@ ProcessKey(event.key); SDL_MOUSEBUTTONDOWN: - ProcessMouse(event.button, true); + if GameState = gsConfirm then + begin + resetPosition(); + ParseCommand('quit', true); + end + else + ProcessMouse(event.button, true); SDL_MOUSEBUTTONUP: ProcessMouse(event.button, false); diff -r 67105120662c -r d3dc08500fc0 hedgewars/uCursor.pas --- a/hedgewars/uCursor.pas Tue Dec 04 10:17:16 2012 +0100 +++ b/hedgewars/uCursor.pas Wed Dec 05 18:12:07 2012 +0100 @@ -3,6 +3,7 @@ interface procedure init; +procedure resetPosition; procedure updatePosition; implementation @@ -11,6 +12,11 @@ procedure init; begin + resetPosition(); +end; + +procedure resetPosition; +begin SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); end; diff -r 67105120662c -r d3dc08500fc0 share/hedgewars/Data/Locale/en.txt --- a/share/hedgewars/Data/Locale/en.txt Tue Dec 04 10:17:16 2012 +0100 +++ b/share/hedgewars/Data/Locale/en.txt Wed Dec 05 18:12:07 2012 +0100 @@ -64,7 +64,7 @@ 01:02=%1 wins! 01:03=Volume %1% 01:04=Paused -01:05=Really quit (Y/Esc)? +01:05=Really quit? (Y/Esc) (Click to resume) 01:06=Sudden Death! 01:07=%1 remaining 01:08=Fuel