MenuScreen_Shell_Pause.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. /*
  2. ===========================================================================
  3. Doom 3 BFG Edition GPL Source Code
  4. Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
  5. This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
  6. Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
  16. In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
  17. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
  18. ===========================================================================
  19. */
  20. #pragma hdrstop
  21. #include "../../idLib/precompiled.h"
  22. #include "../Game_local.h"
  23. extern idCVar g_demoMode;
  24. const static int NUM_PAUSE_OPTIONS = 6;
  25. enum pauseMenuCmds_t {
  26. PAUSE_CMD_RESTART,
  27. PAUSE_CMD_DEAD_RESTART,
  28. PAUSE_CMD_SETTINGS,
  29. PAUSE_CMD_EXIT,
  30. PAUSE_CMD_LEAVE,
  31. PAUSE_CMD_RETURN,
  32. PAUSE_CMD_LOAD,
  33. PAUSE_CMD_SAVE,
  34. PAUSE_CMD_PS3,
  35. PAUSE_CMD_INVITE_FRIENDS
  36. };
  37. /*
  38. ========================
  39. idMenuScreen_Shell_Pause::Initialize
  40. ========================
  41. */
  42. void idMenuScreen_Shell_Pause::Initialize( idMenuHandler * data ) {
  43. idMenuScreen::Initialize( data );
  44. if ( data != NULL ) {
  45. menuGUI = data->GetGUI();
  46. }
  47. SetSpritePath( "menuPause" );
  48. options = new (TAG_SWF) idMenuWidget_DynamicList();
  49. options->SetNumVisibleOptions( NUM_PAUSE_OPTIONS );
  50. options->SetSpritePath( GetSpritePath(), "info", "options" );
  51. options->SetWrappingAllowed( true );
  52. AddChild( options );
  53. idMenuWidget_Help * const helpWidget = new ( TAG_SWF ) idMenuWidget_Help();
  54. helpWidget->SetSpritePath( GetSpritePath(), "info", "helpTooltip" );
  55. AddChild( helpWidget );
  56. while ( options->GetChildren().Num() < NUM_PAUSE_OPTIONS ) {
  57. idMenuWidget_Button * const buttonWidget = new (TAG_SWF) idMenuWidget_Button();
  58. buttonWidget->Initialize( data );
  59. buttonWidget->RegisterEventObserver( helpWidget );
  60. options->AddChild( buttonWidget );
  61. }
  62. options->Initialize( data );
  63. options->AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new (TAG_SWF) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN ) );
  64. options->AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new (TAG_SWF) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP ) );
  65. options->AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_RELEASE ) );
  66. options->AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_RELEASE ) );
  67. options->AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK ).Set( new (TAG_SWF) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK ) );
  68. options->AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK ).Set( new (TAG_SWF) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK ) );
  69. options->AddEventAction( WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_DOWN_LSTICK_RELEASE ) );
  70. options->AddEventAction( WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ).Set( new (TAG_SWF) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_STOP_REPEATER, WIDGET_EVENT_SCROLL_UP_LSTICK_RELEASE ) );
  71. }
  72. /*
  73. ========================
  74. idMenuScreen_Shell_Pause::Update
  75. ========================
  76. */
  77. void idMenuScreen_Shell_Pause::Update() {
  78. if ( menuData != NULL ) {
  79. idMenuWidget_CommandBar * cmdBar = menuData->GetCmdBar();
  80. if ( cmdBar != NULL ) {
  81. cmdBar->ClearAllButtons();
  82. idMenuWidget_CommandBar::buttonInfo_t * buttonInfo;
  83. buttonInfo = cmdBar->GetButton( idMenuWidget_CommandBar::BUTTON_JOY1 );
  84. if ( menuData->GetPlatform() != 2 ) {
  85. buttonInfo->label = "#str_SWF_SELECT";
  86. }
  87. buttonInfo->action.Set( WIDGET_ACTION_PRESS_FOCUSED );
  88. bool isDead = false;
  89. idPlayer * player = gameLocal.GetLocalPlayer();
  90. if ( player != NULL ) {
  91. if ( player->health <= 0 ) {
  92. isDead = true;
  93. }
  94. }
  95. if ( !isDead ) {
  96. buttonInfo = cmdBar->GetButton( idMenuWidget_CommandBar::BUTTON_JOY2 );
  97. if ( menuData->GetPlatform() != 2 ) {
  98. buttonInfo->label = "#str_00395";
  99. }
  100. buttonInfo->action.Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_RETURN );
  101. }
  102. }
  103. }
  104. idMenuScreen::Update();
  105. }
  106. /*
  107. ========================
  108. idMenuScreen_Shell_Pause::ShowScreen
  109. ========================
  110. */
  111. void idMenuScreen_Shell_Pause::ShowScreen( const mainMenuTransition_t transitionType ) {
  112. idList< idList< idStr, TAG_IDLIB_LIST_MENU >, TAG_IDLIB_LIST_MENU > menuOptions;
  113. idList< idStr > option;
  114. bool isDead = false;
  115. idPlayer * player = gameLocal.GetLocalPlayer();
  116. if ( player != NULL ) {
  117. if ( player->health <= 0 ) {
  118. isDead = true;
  119. }
  120. }
  121. if ( g_demoMode.GetBool() ) {
  122. isMpPause = false;
  123. if ( isDead ) {
  124. option.Append( "#str_swf_restart_map" ); // retart map
  125. menuOptions.Append( option );
  126. option.Clear();
  127. option.Append( "#str_swf_settings" ); // settings
  128. menuOptions.Append( option );
  129. option.Clear();
  130. option.Append( "#str_swf_exit_game" ); // exit game
  131. menuOptions.Append( option );
  132. int index = 0;
  133. options->GetChildByIndex( index ).ClearEventActions();
  134. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_DEAD_RESTART );
  135. index++;
  136. options->GetChildByIndex( index ).ClearEventActions();
  137. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_SETTINGS );
  138. index++;
  139. options->GetChildByIndex( index ).ClearEventActions();
  140. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_LEAVE );
  141. } else {
  142. option.Append( "#str_04106" ); // return to game
  143. menuOptions.Append( option );
  144. option.Clear();
  145. option.Append( "#str_swf_restart_map" ); // retart map
  146. menuOptions.Append( option );
  147. option.Clear();
  148. option.Append( "#str_swf_settings" ); // settings
  149. menuOptions.Append( option );
  150. option.Clear();
  151. option.Append( "#str_swf_exit_game" ); // exit game
  152. menuOptions.Append( option );
  153. int index = 0;
  154. options->GetChildByIndex( index ).ClearEventActions();
  155. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_RETURN );
  156. index++;
  157. options->GetChildByIndex( index ).ClearEventActions();
  158. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_RESTART );
  159. index++;
  160. options->GetChildByIndex( index ).ClearEventActions();
  161. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_SETTINGS );
  162. index++;
  163. options->GetChildByIndex( index ).ClearEventActions();
  164. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_EXIT );
  165. }
  166. } else {
  167. if ( common->IsMultiplayer() ) {
  168. isMpPause = true;
  169. option.Append( "#str_04106" ); // return to game
  170. menuOptions.Append( option );
  171. option.Clear();
  172. option.Append( "#str_swf_settings" ); // settings
  173. menuOptions.Append( option );
  174. option.Clear();
  175. option.Append( "#str_swf_invite_friends_upper" ); // settings
  176. menuOptions.Append( option );
  177. option.Clear();
  178. option.Append( "#str_swf_leave_game" ); // leave game
  179. menuOptions.Append( option );
  180. int index = 0;
  181. idMenuWidget_Button * buttonWidget = NULL;
  182. options->GetChildByIndex( index ).ClearEventActions();
  183. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_RETURN );
  184. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  185. if ( buttonWidget != NULL ) {
  186. buttonWidget->SetDescription( "#str_swf_resume_desc" );
  187. }
  188. index++;
  189. options->GetChildByIndex( index ).ClearEventActions();
  190. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_SETTINGS );
  191. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  192. if ( buttonWidget != NULL ) {
  193. buttonWidget->SetDescription( "#str_02206" );
  194. }
  195. index++;
  196. options->GetChildByIndex( index ).ClearEventActions();
  197. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_INVITE_FRIENDS );
  198. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  199. if ( buttonWidget != NULL ) {
  200. buttonWidget->SetDescription( "#str_swf_invite_desc" );
  201. }
  202. index++;
  203. options->GetChildByIndex( index ).ClearEventActions();
  204. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_LEAVE );
  205. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  206. if ( buttonWidget != NULL ) {
  207. buttonWidget->SetDescription( "#str_swf_exit_game_desc" );
  208. }
  209. } else {
  210. isMpPause = false;
  211. if ( isDead ) {
  212. option.Append( "#str_02187" ); // load game
  213. menuOptions.Append( option );
  214. option.Clear();
  215. option.Append( "#str_swf_settings" ); // settings
  216. menuOptions.Append( option );
  217. option.Clear();
  218. option.Append( "#str_swf_exit_game" ); // exit game
  219. menuOptions.Append( option );
  220. int index = 0;
  221. idMenuWidget_Button * buttonWidget = NULL;
  222. options->GetChildByIndex( index ).ClearEventActions();
  223. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_LOAD );
  224. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  225. if ( buttonWidget != NULL ) {
  226. buttonWidget->SetDescription( "#str_02213" );
  227. }
  228. index++;
  229. options->GetChildByIndex( index ).ClearEventActions();
  230. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_SETTINGS );
  231. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  232. if ( buttonWidget != NULL ) {
  233. buttonWidget->SetDescription( "#str_02206" );
  234. }
  235. index++;
  236. options->GetChildByIndex( index ).ClearEventActions();
  237. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_EXIT );
  238. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  239. if ( buttonWidget != NULL ) {
  240. buttonWidget->SetDescription( "#str_swf_exit_game_desc" );
  241. }
  242. } else {
  243. option.Append( "#str_04106" ); // return to game
  244. menuOptions.Append( option );
  245. option.Clear();
  246. option.Append( "#str_02179" ); // save game
  247. menuOptions.Append( option );
  248. option.Clear();
  249. option.Append( "#str_02187" ); // load game
  250. menuOptions.Append( option );
  251. option.Clear();
  252. option.Append( "#str_swf_settings" ); // settings
  253. menuOptions.Append( option );
  254. option.Clear();
  255. option.Append( "#str_swf_exit_game" ); // exit game
  256. menuOptions.Append( option );
  257. int index = 0;
  258. idMenuWidget_Button * buttonWidget = NULL;
  259. options->GetChildByIndex( index ).ClearEventActions();
  260. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_RETURN );
  261. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  262. if ( buttonWidget != NULL ) {
  263. buttonWidget->SetDescription( "#str_swf_resume_desc" );
  264. }
  265. index++;
  266. options->GetChildByIndex( index ).ClearEventActions();
  267. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_SAVE );
  268. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  269. if ( buttonWidget != NULL ) {
  270. buttonWidget->SetDescription( "#str_02211" );
  271. }
  272. index++;
  273. options->GetChildByIndex( index ).ClearEventActions();
  274. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_LOAD );
  275. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  276. if ( buttonWidget != NULL ) {
  277. buttonWidget->SetDescription( "#str_02213" );
  278. }
  279. index++;
  280. options->GetChildByIndex( index ).ClearEventActions();
  281. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_SETTINGS );
  282. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  283. if ( buttonWidget != NULL ) {
  284. buttonWidget->SetDescription( "#str_02206" );
  285. }
  286. index++;
  287. options->GetChildByIndex( index ).ClearEventActions();
  288. options->GetChildByIndex( index ).AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, PAUSE_CMD_EXIT );
  289. buttonWidget = dynamic_cast< idMenuWidget_Button * >( &options->GetChildByIndex( index ) );
  290. if ( buttonWidget != NULL ) {
  291. buttonWidget->SetDescription( "#str_swf_exit_game_desc" );
  292. }
  293. }
  294. }
  295. }
  296. options->SetListData( menuOptions );
  297. idMenuScreen::ShowScreen( transitionType );
  298. if ( options->GetFocusIndex() >= menuOptions.Num() ) {
  299. options->SetViewIndex( 0 );
  300. options->SetFocusIndex( 0 );
  301. }
  302. }
  303. /*
  304. ========================
  305. idMenuScreen_Shell_Pause::HideScreen
  306. ========================
  307. */
  308. void idMenuScreen_Shell_Pause::HideScreen( const mainMenuTransition_t transitionType ) {
  309. idMenuScreen::HideScreen( transitionType );
  310. }
  311. /*
  312. ========================
  313. idMenuScreen_Shell_Pause::HandleExitGameBtn
  314. ========================
  315. */
  316. void idMenuScreen_Shell_Pause::HandleExitGameBtn() {
  317. class idSWFScriptFunction_QuitDialog : public idSWFScriptFunction_RefCounted {
  318. public:
  319. idSWFScriptFunction_QuitDialog( idMenuScreen_Shell_Pause * _menu, gameDialogMessages_t _msg, bool _accept ) {
  320. menu = _menu;
  321. msg = _msg;
  322. accept = _accept;
  323. }
  324. idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) {
  325. common->Dialog().ClearDialog( msg );
  326. if ( accept ) {
  327. cmdSystem->BufferCommandText( CMD_EXEC_APPEND, "disconnect\n" );
  328. }
  329. return idSWFScriptVar();
  330. }
  331. private:
  332. idMenuScreen_Shell_Pause * menu;
  333. gameDialogMessages_t msg;
  334. bool accept;
  335. };
  336. gameDialogMessages_t msg = GDM_SP_QUIT_SAVE;
  337. if ( common->IsMultiplayer() ) {
  338. if ( ( session->GetGameLobbyBase().GetNumLobbyUsers() > 1 ) && MatchTypeHasStats( session->GetGameLobbyBase().GetMatchParms().matchFlags ) ) {
  339. msg = GDM_MULTI_VDM_QUIT_LOSE_LEADERBOARDS;
  340. } else {
  341. msg = GDM_MULTI_VDM_QUIT;
  342. }
  343. }
  344. common->Dialog().AddDialog( msg, DIALOG_ACCEPT_CANCEL, new idSWFScriptFunction_QuitDialog( this, msg, true ), new idSWFScriptFunction_QuitDialog( this, msg, false ), false );
  345. }
  346. /*
  347. ========================
  348. idMenuScreen_Shell_Pause::HandleRestartBtn
  349. ========================
  350. */
  351. void idMenuScreen_Shell_Pause::HandleRestartBtn() {
  352. class idSWFScriptFunction_RestartDialog : public idSWFScriptFunction_RefCounted {
  353. public:
  354. idSWFScriptFunction_RestartDialog( idMenuScreen_Shell_Pause * _menu, gameDialogMessages_t _msg, bool _accept ) {
  355. menu = _menu;
  356. msg = _msg;
  357. accept = _accept;
  358. }
  359. idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) {
  360. common->Dialog().ClearDialog( msg );
  361. if ( accept ) {
  362. cmdSystem->AppendCommandText( "restartMap\n" );
  363. }
  364. return idSWFScriptVar();
  365. }
  366. private:
  367. idMenuScreen_Shell_Pause * menu;
  368. gameDialogMessages_t msg;
  369. bool accept;
  370. };
  371. common->Dialog().AddDialog( GDM_SP_RESTART_SAVE, DIALOG_ACCEPT_CANCEL, new idSWFScriptFunction_RestartDialog( this, GDM_SP_RESTART_SAVE, true ), new idSWFScriptFunction_RestartDialog( this, GDM_SP_RESTART_SAVE, false ), false );
  372. }
  373. /*
  374. ========================
  375. idMenuScreen_Shell_Pause::HandleAction
  376. ========================
  377. */
  378. bool idMenuScreen_Shell_Pause::HandleAction( idWidgetAction & action, const idWidgetEvent & event, idMenuWidget * widget, bool forceHandled ) {
  379. if ( menuData == NULL ) {
  380. return true;
  381. }
  382. if ( menuData->ActiveScreen() != SHELL_AREA_ROOT ) {
  383. return false;
  384. }
  385. widgetAction_t actionType = action.GetType();
  386. const idSWFParmList & parms = action.GetParms();
  387. switch ( actionType ) {
  388. case WIDGET_ACTION_COMMAND: {
  389. switch ( parms[0].ToInteger() ) {
  390. case PAUSE_CMD_RESTART: {
  391. HandleRestartBtn();
  392. break;
  393. }
  394. case PAUSE_CMD_DEAD_RESTART: {
  395. cmdSystem->AppendCommandText( "restartMap\n" );
  396. break;
  397. }
  398. case PAUSE_CMD_SETTINGS: {
  399. menuData->SetNextScreen( SHELL_AREA_SETTINGS, MENU_TRANSITION_SIMPLE );
  400. break;
  401. }
  402. case PAUSE_CMD_LEAVE:
  403. case PAUSE_CMD_EXIT: {
  404. HandleExitGameBtn();
  405. break;
  406. }
  407. case PAUSE_CMD_RETURN: {
  408. menuData->SetNextScreen( SHELL_AREA_INVALID, MENU_TRANSITION_SIMPLE );
  409. break;
  410. }
  411. case PAUSE_CMD_LOAD: {
  412. menuData->SetNextScreen( SHELL_AREA_LOAD, MENU_TRANSITION_SIMPLE );
  413. break;
  414. }
  415. case PAUSE_CMD_SAVE: {
  416. menuData->SetNextScreen( SHELL_AREA_SAVE, MENU_TRANSITION_SIMPLE );
  417. break;
  418. }
  419. case PAUSE_CMD_PS3: {
  420. menuData->SetNextScreen( SHELL_AREA_PLAYSTATION, MENU_TRANSITION_SIMPLE );
  421. break;
  422. }
  423. case PAUSE_CMD_INVITE_FRIENDS: {
  424. session->InviteFriends();
  425. break;
  426. }
  427. }
  428. return true;
  429. }
  430. }
  431. return idMenuWidget::HandleAction( action, event, widget, forceHandled );
  432. }