2012-11-26 18:58:24 +00:00
|
|
|
/*
|
|
|
|
===========================================================================
|
|
|
|
|
|
|
|
Doom 3 BFG Edition GPL Source Code
|
2012-11-28 15:47:07 +00:00
|
|
|
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
2012-11-26 18:58:24 +00:00
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
2012-11-26 18:58:24 +00:00
|
|
|
|
|
|
|
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
===========================================================================
|
|
|
|
*/
|
|
|
|
#include "../idlib/precompiled.h"
|
|
|
|
#pragma hdrstop
|
|
|
|
|
|
|
|
#include "Common_dialog.h"
|
|
|
|
|
|
|
|
idCVar popupDialog_debug( "popupDialog_debug", "0", CVAR_BOOL | CVAR_ARCHIVE, "display debug spam" );
|
|
|
|
|
|
|
|
extern idCVar g_demoMode;
|
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
static const char* dialogStateToString[ GDM_MAX + 1 ] =
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ASSERT_ENUM_STRING( GDM_INVALID, 0 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SWAP_DISKS_TO1, 1 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SWAP_DISKS_TO2, 2 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SWAP_DISKS_TO3, 3 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_NO_GAMER_PROFILE, 4 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_PLAY_ONLINE_NO_PROFILE, 5 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LEADERBOARD_ONLINE_NO_PROFILE, 6 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_NO_STORAGE_SELECTED, 7 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_ONLINE_INCORRECT_PERMISSIONS, 8 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SP_QUIT_SAVE, 9 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SP_RESTART_SAVE, 10 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SP_SIGNIN_CHANGE, 11 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SERVER_NOT_AVAILABLE, 12 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONNECTION_LOST_HOST, 13 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONNECTION_LOST, 14 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_OPPONENT_CONNECTION_LOST, 15 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_HOST_CONNECTION_LOST, 16 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_HOST_CONNECTION_LOST_STATS, 17 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_FAILED_TO_LOAD_RANKINGS, 18 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_HOST_QUIT, 19 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_BECAME_HOST_PARTY, 20 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_NEW_HOST_PARTY, 21 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LOBBY_BECAME_HOST_GAME, 22 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LOBBY_NEW_HOST_GAME, 23 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_NEW_HOST_GAME, 24 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_NEW_HOST_GAME_STATS_DROPPED, 25 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_BECAME_HOST_GAME, 26 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_BECAME_HOST_GAME_STATS_DROPPED, 27 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LOBBY_DISBANDED, 28 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LEAVE_WITH_PARTY, 29 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LEAVE_LOBBY_RET_MAIN, 30 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LEAVE_LOBBY_RET_NEW_PARTY, 31 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MIGRATING, 32 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_OPPONENT_LEFT, 33 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_NO_MATCHES_FOUND, 34 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_INVALID_INVITE, 35 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_KICKED, 36 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_BANNED, 37 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SAVING, 38 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_OVERWRITE_SAVE, 39 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LOAD_REQUEST, 40 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_AUTOSAVE_DISABLED_STORAGE_REMOVED, 41 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_STORAGE_INVALID, 42 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_STORAGE_REMOVED, 43 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONNECTING, 44 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_REFRESHING, 45 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DELETE_SAVE, 46 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DELETING, 47 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_BINDING_ALREDY_SET, 48 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CANNOT_BIND, 49 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_OVERLAY_DISABLED, 50 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DIRECT_MAP_CHANGE, 51 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DELETE_AUTOSAVE, 52 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_QUICK_SAVE, 53 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MULTI_RETRY, 54 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MULTI_SELF_DESTRUCT, 55 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MULTI_VDM_QUIT, 56 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MULTI_COOP_QUIT, 57 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LOADING_PROFILE, 58 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_STORAGE_REQUIRED, 59 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_INSUFFICENT_STORAGE_SPACE, 60 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_PARTNER_LEFT, 61 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_RESTORE_CORRUPT_SAVEGAME, 62 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_UNRECOVERABLE_SAVEGAME, 63 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_PROFILE_SAVE_ERROR, 64 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LOBBY_FULL, 65 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_QUIT_GAME, 66 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONNECTION_PROBLEMS, 67 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_VOICE_RESTRICTED, 68 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LOAD_DAMAGED_FILE, 69 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MUST_SIGNIN, 70 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONNECTION_LOST_NO_LEADERBOARD, 71 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SP_SIGNIN_CHANGE_POST, 72 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MIGRATING_WAITING, 73 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MIGRATING_RELAUNCHING, 74 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MIGRATING_FAILED_CONNECTION, 75 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MIGRATING_FAILED_CONNECTION_STATS, 76 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MIGRATING_FAILED_DISBANDED, 77 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MIGRATING_FAILED_DISBANDED_STATS, 78 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MIGRATING_FAILED_PARTNER_LEFT, 79 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_HOST_RETURNED_TO_LOBBY, 80 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_HOST_RETURNED_TO_LOBBY_STATS_DROPPED, 81 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_FAILED_JOIN_LOCAL_SESSION, 82 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DELETE_CORRUPT_SAVEGAME, 83 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LEAVE_INCOMPLETE_INSTANCE, 84 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_UNBIND_CONFIRM, 85 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_BINDINGS_RESTORE, 86 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_NEW_HOST, 87 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONFIRM_VIDEO_CHANGES, 88 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_UNABLE_TO_USE_SELECTED_STORAGE_DEVICE, 89 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_ERROR_LOADING_SAVEGAME, 90 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_ERROR_SAVING_SAVEGAME, 91 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DISCARD_CHANGES, 92 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LEAVE_LOBBY, 93 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_LEAVE_LOBBY_AND_TEAM, 94 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONTROLLER_DISCONNECTED_0, 95 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONTROLLER_DISCONNECTED_1, 96 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONTROLLER_DISCONNECTED_2, 97 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONTROLLER_DISCONNECTED_3, 98 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONTROLLER_DISCONNECTED_4, 99 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONTROLLER_DISCONNECTED_5, 100 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CONTROLLER_DISCONNECTED_6, 101 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DLC_ERROR_REMOVED, 102 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DLC_ERROR_CORRUPT, 103 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DLC_ERROR_MISSING, 104 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DLC_ERROR_MISSING_GENERIC, 105 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DISC_SWAP, 106 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_NEEDS_INSTALL, 107 ),
|
2012-11-28 15:47:07 +00:00
|
|
|
ASSERT_ENUM_STRING( GDM_NO_SAVEGAMES_AVAILABLE, 108 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_ERROR_JOIN_TWO_PROFILES_ONE_BOX, 109 ),
|
2012-11-26 18:58:24 +00:00
|
|
|
ASSERT_ENUM_STRING( GDM_WARNING_PLAYING_COOP_SOLO, 110 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MULTI_COOP_QUIT_LOSE_LEADERBOARDS, 111 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CORRUPT_CONTINUE, 112 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MULTI_VDM_QUIT_LOSE_LEADERBOARDS, 113 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_WARNING_PLAYING_VDM_SOLO, 114 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_NO_GUEST_SUPPORT, 115 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DISC_SWAP_CONFIRMATION, 116 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_ERROR_LOADING_PROFILE, 117 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CANNOT_INVITE_LOBBY_FULL, 118 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_WARNING_FOR_NEW_DEVICE_ABOUT_TO_LOSE_PROGRESS, 119 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DISCONNECTED, 120 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_INCOMPATIBLE_NEWER_SAVE, 121 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_ACHIEVEMENTS_DISABLED_DUE_TO_CHEATING, 122 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_INCOMPATIBLE_POINTER_SIZE, 123 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_TEXTUREDETAIL_RESTARTREQUIRED, 124 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_TEXTUREDETAIL_INSUFFICIENT_CPU, 125 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CHECKPOINT_SAVE, 126 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CALCULATING_BENCHMARK, 127 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DISPLAY_BENCHMARK, 128 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_DISPLAY_CHANGE_FAILED, 129 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_GPU_TRANSCODE_FAILED, 130 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_OUT_OF_MEMORY, 131 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_CORRUPT_PROFILE, 132 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_PROFILE_TOO_OUT_OF_DATE_DEVELOPMENT_ONLY, 133 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SP_LOAD_SAVE, 134 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_INSTALLING_TROPHIES, 135 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_XBOX_DEPLOYMENT_TYPE_FAIL, 136 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_SAVEGAME_WRONG_LANGUAGE, 137 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_GAME_RESTART_REQUIRED, 138 ),
|
|
|
|
ASSERT_ENUM_STRING( GDM_MAX, 139 )
|
|
|
|
};
|
|
|
|
|
|
|
|
idCVar dialog_saveClearLevel( "dialog_saveClearLevel", "1000", CVAR_INTEGER, "Time required to show long message" );
|
|
|
|
|
|
|
|
/*
|
|
|
|
========================
|
|
|
|
bool DialogMsgShouldWait
|
|
|
|
|
|
|
|
There are a few dialog types that should pause so the user has the ability to read what's going on
|
|
|
|
========================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
bool DialogMsgShouldWait( gameDialogMessages_t msg )
|
|
|
|
{
|
|
|
|
switch( msg )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
case GDM_SAVING:
|
|
|
|
case GDM_QUICK_SAVE:
|
|
|
|
case GDM_LOADING_PROFILE:
|
|
|
|
case GDM_INSTALLING_TROPHIES:
|
|
|
|
case GDM_REFRESHING:
|
|
|
|
return true;
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::ClearDialogs
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::ClearDialogs( bool forceClear )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
bool topMessageCleared = false;
|
2012-11-28 15:47:07 +00:00
|
|
|
for( int index = 0; index < messageList.Num(); ++index )
|
|
|
|
{
|
|
|
|
if( !messageList[index].leaveOnClear || forceClear )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ReleaseCallBacks( index );
|
|
|
|
messageList.RemoveIndex( index );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( index == 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
topMessageCleared = true;
|
|
|
|
}
|
|
|
|
index--;
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
2012-11-26 18:58:24 +00:00
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( topMessageCleared )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ActivateDialog( false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::AddDialogIntVal
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::AddDialogIntVal( const char* name, int val )
|
|
|
|
{
|
|
|
|
if( dialog != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->SetGlobal( name, val );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::AddDialog
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::AddDialog( gameDialogMessages_t msg, dialogType_t type, idSWFScriptFunction* acceptCallback,
|
|
|
|
idSWFScriptFunction* cancelCallback, bool pause, const char* location, int lineNumber,
|
|
|
|
bool leaveOnMapHeapReset, bool waitOnAtlas, bool renderDuringLoad )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
|
|
|
|
idKeyInput::ClearStates();
|
|
|
|
|
|
|
|
// TODO_D3_PORT:
|
|
|
|
//sys->ClearEvents();
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
idLib::PrintfIf( popupDialog_debug.GetBool(), "[%s] msg: %s, pause: %d from: %s:%d\n", __FUNCTION__, dialogStateToString[msg], pause, location == NULL ? "NULL" : location, lineNumber );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( dialog == NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
idDialogInfo info;
|
|
|
|
info.msg = msg;
|
|
|
|
info.type = type;
|
|
|
|
info.acceptCB = acceptCallback;
|
|
|
|
info.cancelCB = cancelCallback;
|
|
|
|
info.clear = false;
|
|
|
|
info.pause = pause;
|
|
|
|
info.startTime = Sys_Milliseconds();
|
|
|
|
info.killTime = 0;
|
|
|
|
info.leaveOnClear = leaveOnMapHeapReset;
|
|
|
|
info.renderDuringLoad = renderDuringLoad;
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
AddDialogInternal( info );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
========================
|
|
|
|
idCommonDialog::AddDynamicDialog
|
|
|
|
========================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::AddDynamicDialog( gameDialogMessages_t msg, const idStaticList< idSWFScriptFunction*, 4 >& callbacks,
|
|
|
|
const idStaticList< idStrId, 4 >& optionText, bool pause, idStrStatic< 256 > overrideMsg,
|
|
|
|
bool leaveOnMapHeapReset, bool waitOnAtlas, bool renderDuringLoad )
|
|
|
|
{
|
|
|
|
|
|
|
|
if( dialog == NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
idDialogInfo info;
|
|
|
|
info.msg = msg;
|
|
|
|
info.overrideMsg = overrideMsg;
|
|
|
|
info.type = DIALOG_DYNAMIC;
|
|
|
|
info.pause = pause;
|
|
|
|
info.leaveOnClear = leaveOnMapHeapReset;
|
|
|
|
info.acceptCB = 0 < callbacks.Num() ? callbacks[0] : NULL;
|
|
|
|
info.cancelCB = 1 < callbacks.Num() ? callbacks[1] : NULL;
|
|
|
|
info.altCBOne = 2 < callbacks.Num() ? callbacks[2] : NULL;
|
|
|
|
info.altCBTwo = 3 < callbacks.Num() ? callbacks[3] : NULL;
|
|
|
|
info.txt1 = 0 < optionText.Num() ? optionText[0] : idStrId();
|
|
|
|
info.txt2 = 1 < optionText.Num() ? optionText[1] : idStrId();
|
|
|
|
info.txt3 = 2 < optionText.Num() ? optionText[2] : idStrId();
|
|
|
|
info.txt4 = 3 < optionText.Num() ? optionText[3] : idStrId();
|
|
|
|
info.renderDuringLoad = renderDuringLoad;
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
info.clear = false;
|
|
|
|
info.startTime = Sys_Milliseconds();
|
|
|
|
info.killTime = 0;
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
AddDialogInternal( info );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
========================
|
|
|
|
idCommonDialog::AddDialogInternal
|
|
|
|
========================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::AddDialogInternal( idDialogInfo& info )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
|
|
|
|
// don't add the dialog if it's already in the list, we never want to show a duplicate dialog
|
2012-11-28 15:47:07 +00:00
|
|
|
if( HasDialogMsg( info.msg, NULL ) )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
// Remove the delete confirmation if we remove the device and ask for a storage confirmation
|
2012-11-28 15:47:07 +00:00
|
|
|
if( info.msg == GDM_STORAGE_REQUIRED )
|
|
|
|
{
|
|
|
|
if( HasDialogMsg( GDM_DELETE_SAVE, NULL ) )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ClearDialog( GDM_DELETE_SAVE, NULL, 0 );
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
if( HasDialogMsg( GDM_DELETE_AUTOSAVE, NULL ) )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ClearDialog( GDM_DELETE_AUTOSAVE, NULL, 0 );
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
if( HasDialogMsg( GDM_LOAD_DAMAGED_FILE, NULL ) )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ClearDialog( GDM_LOAD_DAMAGED_FILE, NULL, 0 );
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( info.acceptCB != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
info.acceptCB->AddRef();
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( info.cancelCB != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
info.cancelCB->AddRef();
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( info.altCBOne != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
info.altCBOne->AddRef();
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( info.altCBTwo != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
info.altCBTwo->AddRef();
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( messageList.Num() == 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList.Append( info );
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
// attempting to add another one beyond our set max. take off the oldest
|
|
|
|
// one from the list in order to not crash, but this really isn't a good
|
|
|
|
// thing to be happening...
|
2012-11-28 15:47:07 +00:00
|
|
|
if( !verify( messageList.Num() < MAX_DIALOGS ) )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList.RemoveIndex( MAX_DIALOGS - 1 );
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( messageList.Num() > 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
idLib::PrintfIf( popupDialog_debug.GetBool(), "[%s] msg: %s new dialog added over old\n", __FUNCTION__, dialogStateToString[info.msg] );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->Activate( false );
|
|
|
|
messageList.Insert( info, 0 );
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( info.type == DIALOG_QUICK_SAVE || info.type == DIALOG_CRAWL_SAVE || messageList[0].msg == GDM_CALCULATING_BENCHMARK )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ShowNextDialog();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
========================
|
|
|
|
idCommonDialog::ActivateDialog
|
|
|
|
========================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::ActivateDialog( bool activate )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
dialogInUse = activate;
|
2012-11-28 15:47:07 +00:00
|
|
|
if( dialog != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->Activate( activate );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::ShowDialog
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::ShowDialog( const idDialogInfo& info )
|
|
|
|
{
|
|
|
|
idLib::PrintfIf( popupDialog_debug.GetBool(), "[%s] msg: %s, m.clear = %d, m.waitClear = %d, m.killTime = %d\n",
|
|
|
|
__FUNCTION__, dialogStateToString[info.msg], info.clear, info.waitClear, info.killTime );
|
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
// here instead of add dialog to make sure we meet the TCR, otherwise it has a chance to be visible for less than 1 second
|
2012-11-28 15:47:07 +00:00
|
|
|
if( DialogMsgShouldWait( info.msg ) && !dialogInUse )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
startSaveTime = Sys_Milliseconds();
|
|
|
|
stopSaveTime = 0;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( IsDialogActive() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->Activate( false );
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
idStr message, title;
|
|
|
|
GetDialogMsg( info.msg, message, title );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->SetGlobal( "titleVal", title );
|
2012-11-28 15:47:07 +00:00
|
|
|
if( info.overrideMsg.IsEmpty() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->SetGlobal( "messageInfo", message );
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->SetGlobal( "messageInfo", info.overrideMsg );
|
|
|
|
}
|
|
|
|
dialog->SetGlobal( "Infotype", info.type );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( info.acceptCB == NULL && ( info.type != DIALOG_WAIT && info.type != DIALOG_WAIT_BLACKOUT ) )
|
|
|
|
{
|
|
|
|
class idSWFScriptFunction_Accept : public idSWFScriptFunction_RefCounted
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
public:
|
2012-11-28 15:47:07 +00:00
|
|
|
idSWFScriptFunction_Accept( gameDialogMessages_t _msg )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
msg = _msg;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
common->Dialog().ClearDialog( msg );
|
|
|
|
return idSWFScriptVar();
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
gameDialogMessages_t msg;
|
|
|
|
};
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
dialog->SetGlobal( "acceptCallBack", new( TAG_SWF ) idSWFScriptFunction_Accept( info.msg ) );
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->SetGlobal( "acceptCallBack", info.acceptCB );
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->SetGlobal( "cancelCallBack", info.cancelCB );
|
|
|
|
dialog->SetGlobal( "altCBOne", info.altCBOne );
|
|
|
|
dialog->SetGlobal( "altCBTwo", info.altCBTwo );
|
|
|
|
dialog->SetGlobal( "opt1Txt", info.txt1.GetLocalizedString() );
|
|
|
|
dialog->SetGlobal( "opt2Txt", info.txt2.GetLocalizedString() );
|
|
|
|
dialog->SetGlobal( "opt3Txt", info.txt3.GetLocalizedString() );
|
|
|
|
dialog->SetGlobal( "opt4Txt", info.txt4.GetLocalizedString() );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
ActivateDialog( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::ShowNextDialog
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::ShowNextDialog()
|
|
|
|
{
|
|
|
|
for( int index = 0; index < messageList.Num(); ++index )
|
|
|
|
{
|
|
|
|
if( !messageList[index].clear )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
idDialogInfo info = messageList[index];
|
|
|
|
ShowDialog( info );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::ShowSaveIndicator
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::ShowSaveIndicator( bool show )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
idLib::PrintfIf( popupDialog_debug.GetBool(), "[%s]\n", __FUNCTION__ );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( show )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
idStr msg = idStrId( "#str_dlg_pc_saving" ).GetLocalizedString();
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
common->Dialog().AddDialog( GDM_SAVING, DIALOG_WAIT, NULL, NULL, true, "", 0, false, true, true );
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
common->Dialog().ClearDialog( GDM_SAVING );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
========================
|
|
|
|
idCommonDialog::RemoveSaveDialog
|
|
|
|
|
|
|
|
From TCR# 047
|
|
|
|
Games must display a message during storage writes for the following conditions and the respective amount of time:
|
2012-11-28 15:47:07 +00:00
|
|
|
- Writes longer than one second require the standard message be displayed for three seconds.
|
|
|
|
- Writes longer than three seconds require the standard message be displayed for the length of the write.
|
|
|
|
- Writes that last one second or less require the shorter message be displayed for one second or the standard message for three seconds.
|
2012-11-26 18:58:24 +00:00
|
|
|
|
|
|
|
========================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::RemoveWaitDialogs()
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
bool topMessageCleared = false;
|
2012-11-28 15:47:07 +00:00
|
|
|
for( int index = 0; index < messageList.Num(); ++index )
|
|
|
|
{
|
|
|
|
if( DialogMsgShouldWait( messageList[index].msg ) )
|
|
|
|
{
|
|
|
|
if( Sys_Milliseconds() >= messageList[index].killTime && messageList[index].waitClear )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList[index].clear = true;
|
|
|
|
messageList[index].waitClear = false;
|
2012-11-28 15:47:07 +00:00
|
|
|
if( index == 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
topMessageCleared = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( topMessageCleared && messageList.Num() > 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ActivateDialog( false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::ClearAllDialogHack
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::ClearAllDialogHack()
|
|
|
|
{
|
|
|
|
for( int index = 0; index < messageList.Num(); ++index )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList[index].clear = true;
|
|
|
|
messageList[index].waitClear = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::HasDialogMsg
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
bool idCommonDialog::HasDialogMsg( gameDialogMessages_t msg, bool* isNowActive )
|
|
|
|
{
|
|
|
|
for( int index = 0; index < messageList.Num(); ++index )
|
|
|
|
{
|
|
|
|
idDialogInfo& info = messageList[index];
|
|
|
|
|
|
|
|
if( info.msg == msg && !info.clear )
|
|
|
|
{
|
|
|
|
if( isNowActive != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
*isNowActive = ( index == 0 );
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( isNowActive != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
*isNowActive = false;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::ClearDialog
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::ClearDialog( gameDialogMessages_t msg, const char* location, int lineNumber )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
bool topMessageCleared = false;
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
for( int index = 0; index < messageList.Num(); ++index )
|
|
|
|
{
|
|
|
|
idDialogInfo& info = messageList[index];
|
|
|
|
|
|
|
|
if( info.msg == msg && !info.clear )
|
|
|
|
{
|
|
|
|
if( DialogMsgShouldWait( info.msg ) )
|
|
|
|
{
|
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
// you can have 2 saving dialogs simultaneously, if you clear back-to-back, we need to let the 2nd dialog
|
|
|
|
// get the clear message
|
2012-11-28 15:47:07 +00:00
|
|
|
if( messageList[index].waitClear )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
continue;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
int timeShown = Sys_Milliseconds() - messageList[index].startTime;
|
|
|
|
|
|
|
|
// for the time being always use the long saves
|
2012-11-28 15:47:07 +00:00
|
|
|
if( timeShown < dialog_saveClearLevel.GetInteger() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList[index].killTime = Sys_Milliseconds() + ( dialog_saveClearLevel.GetInteger() - timeShown );
|
|
|
|
messageList[index].waitClear = true;
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList[index].clear = true;
|
2012-11-28 15:47:07 +00:00
|
|
|
if( index == 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
topMessageCleared = true;
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList[index].clear = true;
|
2012-11-28 15:47:07 +00:00
|
|
|
if( index == 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
topMessageCleared = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assert( info.msg >= GDM_INVALID && info.msg < GDM_MAX ); // not sure why /analyze complains about this
|
2012-11-28 15:47:07 +00:00
|
|
|
idLib::PrintfIf( popupDialog_debug.GetBool(), "[%s] msg: %s, from: %s:%d, topMessageCleared = %d, m.clear = %d, m.waitClear = %d, m.killTime = %d\n",
|
|
|
|
__FUNCTION__, dialogStateToString[info.msg], location == NULL ? "NULL" : location, lineNumber,
|
|
|
|
topMessageCleared, messageList[index].clear,
|
|
|
|
messageList[index].waitClear, messageList[index].killTime );
|
2012-11-26 18:58:24 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( topMessageCleared && messageList.Num() > 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ActivateDialog( false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::ReleaseCallBacks
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::ReleaseCallBacks( int index )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
if( index < messageList.Num() )
|
|
|
|
{
|
|
|
|
if( messageList[index].acceptCB != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList[index].acceptCB->Release();
|
|
|
|
messageList[index].acceptCB = NULL;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( messageList[index].cancelCB != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList[index].cancelCB->Release();
|
|
|
|
messageList[index].cancelCB = NULL;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( messageList[index].altCBOne != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList[index].altCBOne->Release();
|
|
|
|
messageList[index].altCBOne = NULL;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( messageList[index].altCBTwo != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
messageList[index].altCBTwo->Release();
|
|
|
|
messageList[index].altCBTwo = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::Render
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::Render( bool loading )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
|
|
|
|
dialogPause = false;
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( dialog == NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
RemoveWaitDialogs();
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
bool pauseCheck = false;
|
2012-11-28 15:47:07 +00:00
|
|
|
for( int index = 0; index < messageList.Num(); ++index )
|
|
|
|
{
|
|
|
|
if( messageList[index].clear )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
idLib::PrintfIf( popupDialog_debug.GetBool(), "[%s] removing %s\n", __FUNCTION__, dialogStateToString[messageList[index].msg] );
|
|
|
|
ReleaseCallBacks( index );
|
|
|
|
messageList.RemoveIndex( index );
|
|
|
|
index--;
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( messageList[index].pause && !pauseCheck )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
pauseCheck = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
dialogPause = pauseCheck;
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( messageList.Num() > 0 && !dialog->IsActive() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ShowNextDialog();
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( messageList.Num() == 0 && dialog->IsActive() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->Activate( false );
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
// Decrement the time remaining on the save indicator or turn it off
|
2012-11-28 15:47:07 +00:00
|
|
|
if( !dialogShowingSaveIndicatorRequested && saveIndicator->IsActive() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
ShowSaveIndicator( false );
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( messageList.Num() > 0 && messageList[0].type == DIALOG_TIMER_ACCEPT_REVERT )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
int startTime = messageList[0].startTime;
|
|
|
|
int endTime = startTime + PC_KEYBOARD_WAIT;
|
|
|
|
int timeRemaining = ( endTime - Sys_Milliseconds() ) / 1000;
|
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
if( timeRemaining <= 0 )
|
|
|
|
{
|
|
|
|
if( messageList[0].cancelCB != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
idSWFParmList parms;
|
|
|
|
messageList[0].cancelCB->Call( NULL, parms );
|
|
|
|
}
|
|
|
|
messageList[0].clear = true;
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
idStrId txtTime = idStrId( "#str_time_remaining" );
|
|
|
|
dialog->SetGlobal( "countdownInfo", va( txtTime.GetLocalizedString(), timeRemaining ) );
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( messageList.Num() > 0 && loading && ( messageList[0].renderDuringLoad == false ) )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( dialog->IsActive() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
dialog->Render( renderSystem, Sys_Microseconds() );
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
if( saveIndicator != NULL && saveIndicator->IsActive() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
saveIndicator->Render( renderSystem, Sys_Microseconds() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::Init
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::Init()
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
|
|
|
|
idLib::PrintfIf( popupDialog_debug.GetBool(), "[%s]\n", __FUNCTION__ );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
Shutdown();
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
dialog = new( TAG_SWF ) idSWF( "dialog" );
|
|
|
|
saveIndicator = new( TAG_SWF ) idSWF( "save_indicator" );
|
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
#define BIND_DIALOG_CONSTANT( x ) dialog->SetGlobal( #x, x )
|
2012-11-28 15:47:07 +00:00
|
|
|
if( dialog != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_ACCEPT );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_CONTINUE );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_ACCEPT_CANCEL );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_YES_NO );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_CANCEL );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_WAIT );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_WAIT_BLACKOUT );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_WAIT_CANCEL );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_DYNAMIC );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_QUICK_SAVE );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_TIMER_ACCEPT_REVERT );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_CRAWL_SAVE );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_CONTINUE_LARGE );
|
|
|
|
BIND_DIALOG_CONSTANT( DIALOG_BENCHMARK );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::Shutdown
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::Shutdown()
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
idLib::PrintfIf( popupDialog_debug.GetBool(), "[%s]\n", __FUNCTION__ );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
ClearDialogs();
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
delete dialog;
|
|
|
|
dialog = NULL;
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
delete saveIndicator;
|
|
|
|
saveIndicator = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
========================
|
|
|
|
idCommonDialog::Restart
|
|
|
|
========================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
void idCommonDialog::Restart()
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
Shutdown();
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::GetDialogMsg
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
idStr idCommonDialog::GetDialogMsg( gameDialogMessages_t msg, idStr& message, idStr& title )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
message = "#str_dlg_pc_";
|
|
|
|
|
|
|
|
switch( msg )
|
|
|
|
{
|
|
|
|
case GDM_SWAP_DISKS_TO1:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "switch_disc_to_1" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_SWAP_DISKS_TO2:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "switch_disc_to_2" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_SWAP_DISKS_TO3:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "switch_disc_to_3" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NO_GAMER_PROFILE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "signin_request" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_PLAY_ONLINE_NO_PROFILE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "online_signin_request" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LEADERBOARD_ONLINE_NO_PROFILE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "online_signing_request_leaderboards" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NO_STORAGE_SELECTED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "storage_device_selection_request" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_ONLINE_INCORRECT_PERMISSIONS:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "incorrect_online_permissions" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_SP_QUIT_SAVE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = idLocalization::GetString( "#str_04215" );
|
|
|
|
title.ToUpper();
|
2012-11-28 15:47:07 +00:00
|
|
|
if( g_demoMode.GetBool() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_04145";
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_quit_progress_lost";
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_SP_LOAD_SAVE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = idLocalization::GetString( "#str_02187" );
|
|
|
|
title.ToUpper();
|
|
|
|
message = "#str_dlg_360_load_request";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_SP_RESTART_SAVE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = idLocalization::GetString( "#str_04271" );
|
|
|
|
title.ToUpper();
|
|
|
|
message = "#str_dlg_restart_progress_lost";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_SP_SIGNIN_CHANGE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_signin_changed";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_SERVER_NOT_AVAILABLE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "game_server_unavailable" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CONNECTION_LOST_HOST:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_opponent_connection_lost_ranking_not_counted";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CONNECTION_LOST:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "online_connection_lost_main_menu_return" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_OPPONENT_CONNECTION_LOST:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_opponent_connection_lost";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_HOST_CONNECTION_LOST:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_host_connection_lost";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_HOST_CONNECTION_LOST_STATS:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_host_connection_lost_ranking_not_counted";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_FAILED_TO_LOAD_RANKINGS:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_ranking_load_failed";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_HOST_QUIT:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_host_quit";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_OPPONENT_LEFT:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_opponent_left";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_PARTNER_LEFT:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_partner_left";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NO_MATCHES_FOUND:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_matches_not_found";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_INVALID_INVITE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_invalid_game";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_KICKED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_kicked";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_BANNED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_banned";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_SAVING:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = "#str_save_dialog_heading";
|
|
|
|
message.Append( "saving" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_QUICK_SAVE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = "#str_save_dialog_heading";
|
|
|
|
message.Append( "saving" );
|
|
|
|
//message = "#STR_SWF_SAVING";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_OVERWRITE_SAVE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = "#str_02306";
|
|
|
|
message = "#str_dlg_overwrite_save";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LOAD_REQUEST:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "load_request" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_AUTOSAVE_DISABLED_STORAGE_REMOVED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "storage_removed_autosave_disabled" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_STORAGE_INVALID:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "storage_not_available" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CONNECTING:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_connecting";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_REFRESHING:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = "#str_01694";
|
|
|
|
message = "#str_dlg_refreshing";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DELETE_SAVE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = "#str_02313";
|
|
|
|
message.Append( "delete_save" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DELETING:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "deleting" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_BINDING_ALREDY_SET:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "bind_exists" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CANNOT_BIND:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "cannont_bind" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_OVERLAY_DISABLED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "overlay_disabled" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_BECAME_HOST_PARTY:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_became_host_party";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NEW_HOST_PARTY:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_new_host_party";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LOBBY_BECAME_HOST_GAME:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_lobby_became_host_game";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LOBBY_NEW_HOST_GAME:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "lobby_new_host_game" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NEW_HOST_GAME:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_new_host_game";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NEW_HOST_GAME_STATS_DROPPED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_new_host_game_stats_dropped";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_BECAME_HOST_GAME:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "became_host_game" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_BECAME_HOST_GAME_STATS_DROPPED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_became_host_game_stats_dropped";
|
|
|
|
break;
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
case GDM_LOBBY_DISBANDED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "lobby_disbanded" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LEAVE_WITH_PARTY:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_leave_with_party";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LEAVE_LOBBY_RET_MAIN:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "leave_lobby_ret_main" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LEAVE_LOBBY_RET_NEW_PARTY:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "leave_lobby_ret_new_party" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MIGRATING:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_host_migration";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MIGRATING_WAITING:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_host_migration_waiting";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MIGRATING_RELAUNCHING:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_host_migration_relaunching";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DIRECT_MAP_CHANGE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_direct_map_change";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DELETE_AUTOSAVE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "delete_autosave" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MULTI_RETRY:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_confirm_retry";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MULTI_SELF_DESTRUCT:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_confirm_suicide";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MULTI_VDM_QUIT:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_confirm_quit_generic";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MULTI_COOP_QUIT:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_confirm_coop_quit_game_generic";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LOADING_PROFILE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_loading_profile";
|
|
|
|
title = "#str_dlg_updating_profile";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_STORAGE_REQUIRED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "storage_required" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_INSUFFICENT_STORAGE_SPACE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_insufficient_space";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_RESTORE_CORRUPT_SAVEGAME:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_restore_corrupt_savegame";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_UNRECOVERABLE_SAVEGAME:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_unrecoverable_savegame";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_PROFILE_SAVE_ERROR:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "profile_save_error" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LOBBY_FULL:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "lobby_full" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_QUIT_GAME:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = "#str_01975"; // EXIT GAME
|
|
|
|
message = "#str_dlg_confirm_quit";
|
|
|
|
break;
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
case GDM_CONNECTION_PROBLEMS:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_connection_problems";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_VOICE_RESTRICTED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "voice_restricted" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MUST_SIGNIN:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "must_signin" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LOAD_DAMAGED_FILE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_corrupt_save_file";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DLC_ERROR_REMOVED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "dlc_error_content_removed" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DLC_ERROR_CORRUPT:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "dlc_error_content_corrupt" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DLC_ERROR_MISSING:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "dlc_error_content_missing" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DLC_ERROR_MISSING_GENERIC:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "dlc_error_content_missing_generic" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CONNECTION_LOST_NO_LEADERBOARD:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "online_connection_lost_no_leaderboard" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_SP_SIGNIN_CHANGE_POST:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "signin_changed_post" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MIGRATING_FAILED_CONNECTION:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_host_migration_failed";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MIGRATING_FAILED_CONNECTION_STATS:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_host_migration_failed_stats";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MIGRATING_FAILED_DISBANDED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_host_migration_failed_disbanded";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MIGRATING_FAILED_DISBANDED_STATS:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_host_migration_failed_disbanded_stats";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MIGRATING_FAILED_PARTNER_LEFT:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_host_migration_failed_partner_left";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_FAILED_JOIN_LOCAL_SESSION:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_failed_join_local_session";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GDM_DELETE_CORRUPT_SAVEGAME:
|
|
|
|
message = "#str_dlg_delete_corrupt_savegame";
|
|
|
|
break;
|
|
|
|
case GDM_LEAVE_INCOMPLETE_INSTANCE:
|
|
|
|
message = "#str_dlg_leave_incomplete_instance";
|
|
|
|
break;
|
|
|
|
case GDM_UNBIND_CONFIRM:
|
|
|
|
message = "#str_dlg_bind_unbind";
|
|
|
|
break;
|
|
|
|
case GDM_BINDINGS_RESTORE:
|
|
|
|
message = "#str_dlg_bind_restore";
|
|
|
|
break;
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_HOST_RETURNED_TO_LOBBY:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "host_quit_to_lobby" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_HOST_RETURNED_TO_LOBBY_STATS_DROPPED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "host_quit_to_lobby_stats_dropped" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NEW_HOST:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "new_host" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DISC_SWAP:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_disc_swap";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NO_SAVEGAMES_AVAILABLE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_no_savegames_available";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CONFIRM_VIDEO_CHANGES:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_confirm_display_changes";
|
|
|
|
break;
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
case GDM_UNABLE_TO_USE_SELECTED_STORAGE_DEVICE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "unable_to_use_selected_storage_device" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_ERROR_LOADING_SAVEGAME:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_error_loading_savegame";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_ERROR_SAVING_SAVEGAME:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_error_saving_savegame";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DISCARD_CHANGES:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_confirm_discard";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LEAVE_LOBBY:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_leave_game_lobby_alt_02";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_LEAVE_LOBBY_AND_TEAM:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_party_leave_game";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GDM_CONTROLLER_DISCONNECTED_0:
|
|
|
|
case GDM_CONTROLLER_DISCONNECTED_1:
|
|
|
|
case GDM_CONTROLLER_DISCONNECTED_2:
|
|
|
|
case GDM_CONTROLLER_DISCONNECTED_3:
|
|
|
|
case GDM_CONTROLLER_DISCONNECTED_4:
|
|
|
|
case GDM_CONTROLLER_DISCONNECTED_5:
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CONTROLLER_DISCONNECTED_6:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_reconnect_controller";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NEEDS_INSTALL:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_game_install_message";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_ERROR_JOIN_TWO_PROFILES_ONE_BOX:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "online_join_error_two_profiles_one_box" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_WARNING_PLAYING_COOP_SOLO:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_lotw_solo_warning_alt_05";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MULTI_COOP_QUIT_LOSE_LEADERBOARDS:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_confirm_coop_quit_game";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CORRUPT_CONTINUE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_corrupt_save_load";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_MULTI_VDM_QUIT_LOSE_LEADERBOARDS:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_confirm_quit_game";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_WARNING_PLAYING_VDM_SOLO:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_cr_custom_game_no_stats";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_NO_GUEST_SUPPORT:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_ps3_incorrect_online_permissions";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DISC_SWAP_CONFIRMATION:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_disc_swap_confirmation";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_ERROR_LOADING_PROFILE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message.Append( "error_loading_profile" );
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CANNOT_INVITE_LOBBY_FULL:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_join_error_full";
|
|
|
|
break;
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
case GDM_WARNING_FOR_NEW_DEVICE_ABOUT_TO_LOSE_PROGRESS:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_360_new_device_selected";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DISCONNECTED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_online_connection_error_03";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_INCOMPATIBLE_NEWER_SAVE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_newer_incompatible_savegame";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_ACHIEVEMENTS_DISABLED_DUE_TO_CHEATING:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_achievements_disabled_due_to_cheating";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_INCOMPATIBLE_POINTER_SIZE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_pointer_size_mismatch";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_TEXTUREDETAIL_RESTARTREQUIRED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_swf_texture_restart";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_TEXTUREDETAIL_INSUFFICIENT_CPU:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_swf_insufficient_cores";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CALCULATING_BENCHMARK:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_swf_calc_benchmark";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DISPLAY_BENCHMARK:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "BENCHMARK SCORE = ";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_DISPLAY_CHANGE_FAILED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_swf_display_changes_failed";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_GPU_TRANSCODE_FAILED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_swf_gpu_transcode_failed";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_OUT_OF_MEMORY:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_swf_failed_level_load";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_CORRUPT_PROFILE:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_corrupt_profile";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_PROFILE_TOO_OUT_OF_DATE_DEVELOPMENT_ONLY:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_profile_too_out_of_date_development_only";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_INSTALLING_TROPHIES:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
title = "#str_dlg_ps3_trophy_install_heading";
|
|
|
|
message = "#str_dlg_ps3_trophy_installing";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_XBOX_DEPLOYMENT_TYPE_FAIL:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_360_installed_continue";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
case GDM_GAME_RESTART_REQUIRED:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "#str_dlg_game_restart_required";
|
|
|
|
break;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
default:
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
message = "MESSAGE TYPE NOT DEFINED";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
return message;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::HandleDialogEvent
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
bool idCommonDialog::HandleDialogEvent( const sysEvent_t* sev )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
if( dialog != NULL && dialog->IsLoaded() && dialog->IsActive() )
|
|
|
|
{
|
|
|
|
if( saveIndicator->IsActive() )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
return false;
|
2012-11-28 15:47:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( dialog->HandleEvent( sev ) )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
idKeyInput::ClearStates();
|
|
|
|
// TODO_D3_PORT
|
|
|
|
//sys->ClearEvents();
|
|
|
|
}
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
return true;
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
================================================
|
|
|
|
idCommonDialog::IsDialogActive
|
|
|
|
================================================
|
|
|
|
*/
|
2012-11-28 15:47:07 +00:00
|
|
|
bool idCommonDialog::IsDialogActive()
|
|
|
|
{
|
|
|
|
if( dialog != NULL )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
return dialog->IsActive();
|
|
|
|
}
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
CONSOLE_COMMAND( commonDialogClear, "clears all dialogs that may be hung", 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
common->Dialog().ClearAllDialogHack();
|
|
|
|
}
|
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
CONSOLE_COMMAND( testShowDialog, "show a dialog", 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
int dialogId = atoi( args.Argv( 1 ) );
|
2012-11-28 15:47:07 +00:00
|
|
|
common->Dialog().AddDialog( ( gameDialogMessages_t )dialogId, DIALOG_ACCEPT, NULL, NULL, false );
|
2012-11-26 18:58:24 +00:00
|
|
|
}
|
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
CONSOLE_COMMAND( testShowDynamicDialog, "show a dynamic dialog", 0 )
|
|
|
|
{
|
|
|
|
class idSWFScriptFunction_Continue : public idSWFScriptFunction_RefCounted
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
public:
|
2012-11-28 15:47:07 +00:00
|
|
|
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
common->Dialog().ClearDialog( GDM_INSUFFICENT_STORAGE_SPACE );
|
|
|
|
return idSWFScriptVar();
|
|
|
|
}
|
|
|
|
};
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
idStaticList< idSWFScriptFunction*, 4 > callbacks;
|
2012-11-26 18:58:24 +00:00
|
|
|
idStaticList< idStrId, 4 > optionText;
|
2012-11-28 15:47:07 +00:00
|
|
|
callbacks.Append( new( TAG_SWF ) idSWFScriptFunction_Continue() );
|
2012-11-26 18:58:24 +00:00
|
|
|
optionText.Append( idStrId( "#str_swf_continue" ) );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
// build custom space required string
|
|
|
|
// #str_dlg_space_required ~= "There is insufficient storage available. Please free %s and try again."
|
|
|
|
idStr format = idStrId( "#str_dlg_space_required" ).GetLocalizedString();
|
|
|
|
idStr size;
|
|
|
|
int requiredSpaceInBytes = 150000;
|
2012-11-28 15:47:07 +00:00
|
|
|
if( requiredSpaceInBytes > ( 1024 * 1024 ) )
|
|
|
|
{
|
|
|
|
size = va( "%.1f MB", ( float ) requiredSpaceInBytes / ( 1024.0f * 1024.0f ) );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
size = va( "%.0f KB", ( float ) requiredSpaceInBytes / 1024.0f );
|
2012-11-26 18:58:24 +00:00
|
|
|
}
|
|
|
|
idStr msg = va( format.c_str(), size.c_str() );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
2012-11-26 18:58:24 +00:00
|
|
|
common->Dialog().AddDynamicDialog( GDM_INSUFFICENT_STORAGE_SPACE, callbacks, optionText, true, msg );
|
|
|
|
}
|
|
|
|
|
2012-11-28 15:47:07 +00:00
|
|
|
CONSOLE_COMMAND( testShowDialogBug, "show a dynamic dialog", 0 )
|
|
|
|
{
|
2012-11-26 18:58:24 +00:00
|
|
|
common->Dialog().ShowSaveIndicator( true );
|
|
|
|
common->Dialog().ShowSaveIndicator( false );
|
2012-11-28 15:47:07 +00:00
|
|
|
|
|
|
|
// This locks the game because it thinks it's paused because we're passing in pause = true but the
|
2012-11-26 18:58:24 +00:00
|
|
|
// dialog isn't ever added because of the abuse of dialog->isActive when the save indicator is shown.
|
|
|
|
int dialogId = atoi( args.Argv( 1 ) );
|
2012-11-28 15:47:07 +00:00
|
|
|
common->Dialog().AddDialog( ( gameDialogMessages_t )dialogId, DIALOG_ACCEPT, NULL, NULL, true );
|
2012-11-26 18:58:24 +00:00
|
|
|
}
|