idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { if( screen == NULL ) { return idSWFScriptVar(); } if( parms.Num() != 1 ) { return idSWFScriptVar(); } bool pdaDownload = parms[0].ToBool(); if( pdaDownload ) { screen->ToggleNewPDA( true ); } else { screen->ToggleNewVideo( true ); } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { if( !player || !text ) { return idSWFScriptVar(); } idStr val = text->text; val.Replace( "\'", "" ); val.Replace( "\"", "" ); idStr command; if( player->isChatting == 2 ) { command = va( "sayTeam %s\n", val.c_str() ); } else { command = va( "say %s\n", val.c_str() ); } cmdSystem->BufferCommandText( CMD_EXEC_NOW, command.c_str() ); player->isChatting = 0; return idSWFScriptVar(); }
static idSWFScriptVar FormatColumn( const columnDef_t * columnDef, int64 score ) { switch( columnDef->displayType ) { case STATS_COLUMN_DISPLAY_TIME_MILLISECONDS: return idSWFScriptVar( FormatTime( score ) ); case STATS_COLUMN_DISPLAY_CASH: return idSWFScriptVar( FormatCash( score ) ); default: return idSWFScriptVar( FormatNumber( score ) ); } }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { if ( !player ) { return idSWFScriptVar(); } player->isChatting = 0; return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { if( widget == NULL ) { return idSWFScriptVar(); } widget->Update(); return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { idPlayer * player = gameLocal.GetLocalPlayer(); if ( player != NULL ) { player->TogglePDA(); } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { common->Dialog().ClearDialog( GDM_DELETE_AUTOSAVE ); if ( accept ) { menuData->SetNextScreen( SHELL_AREA_NEW_GAME, MENU_TRANSITION_SIMPLE ); } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { if ( handler != NULL ) { handler->TriggerMenu(); } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { common->Dialog().ClearDialog( GDM_LEAVE_LOBBY_RET_MAIN ); session->Cancel(); return idSWFScriptVar(); }
/* ======================== idMenuScreen_Shell_Stereoscopics::idMenuDataSource_StereoSettings::IsDataChanged ======================== */ idSWFScriptVar idMenuScreen_Shell_Stereoscopics::idMenuDataSource_StereoSettings::GetField( const int fieldIndex ) const { if( fieldIndex == STEREO_FIELD_ENABLE ) { return idSWFScriptVar( stereoRender_enable_text[fields[fieldIndex].ToInteger()] ); } return fields[ fieldIndex ]; }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { if ( handler != NULL ) { int screen = parms[0].ToInteger(); handler->UpdateMenuDisplay( screen ); } return idSWFScriptVar(); }
/* ======================== idSWFScriptVar::GetNestedVar ======================== */ idSWFScriptVar idSWFScriptVar::GetNestedVar( const char* arg1, const char* arg2, const char* arg3, const char* arg4, const char* arg5, const char* arg6 ) { if( !IsObject() ) { return idSWFScriptVar(); } return GetObject()->GetNestedVar( arg1, arg2, arg3, arg4, arg5, arg6 ); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { common->Dialog().ClearDialog( msg ); if( accept ) { screen->DeleteGame( index ); } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { common->Dialog().ClearDialog( msg ); if ( accept == 1 ) { common->Quit(); } else if ( accept == -1 ) { session->MoveToPressStart(); } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { common->Dialog().ClearDialog( msg ); if( accept && name != NULL ) { cmdSystem->AppendCommandText( va( "loadgame %s\n", name ) ); } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { common->Dialog().ClearDialog( msg ); if ( restart ) { idStr cmdLine = Sys_GetCmdLine(); if ( cmdLine.Find( "com_skipIntroVideos" ) < 0 ) { cmdLine.Append( " +set com_skipIntroVideos 1" ); } Sys_ReLaunch( (void*)cmdLine.c_str(), cmdLine.Length() ); } return idSWFScriptVar(); }
/* ======================== idSWFSpriteInstance::~idSWFSpriteInstance ======================== */ idSWFSpriteInstance::~idSWFSpriteInstance() { if ( parent != NULL ) { parent->scriptObject->Set( name, idSWFScriptVar() ); } FreeDisplayList(); displayList.Clear(); scriptObject->SetSprite( NULL ); scriptObject->Clear(); scriptObject->Release(); actionScript->Release(); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { common->Dialog().ClearDialog( msg ); if( accept && screen != NULL ) { if( index < screen->GetSortedSaves().Num() ) { session->DeleteSaveGameSync( screen->GetSortedSaves()[ index ].slotName ); } } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { common->Dialog().ClearDialog( msg ); if( restart ) { // DG: Sys_ReLaunch() doesn't need any options anymore // (the old way would have been unnecessarily painful on POSIX systems) Sys_ReLaunch(); // DG end } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { common->Dialog().ClearDialog( msg ); if ( accept ) { cvarSystem->SetModifiedFlags( CVAR_ARCHIVE ); if ( menuHandler != NULL ) { menuHandler->SetNextScreen( SHELL_AREA_SYSTEM_OPTIONS, MENU_TRANSITION_SIMPLE ); } } else { r_fullscreen.SetInteger( optionData.fullscreen ); r_vidMode.SetInteger( optionData.vidmode ); cvarSystem->ClearModifiedFlags( CVAR_ARCHIVE ); cmdSystem->BufferCommandText( CMD_EXEC_APPEND, "vid_restart\n" ); } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { common->Dialog().ClearDialog( msg ); if( accept && screen != NULL ) { // Replace the save if( index < screen->GetSortedSaves().Num() ) { idStr name = screen->GetSortedSaves()[ index ].slotName; cmdSystem->AppendCommandText( va( "savegame %s\n", name.c_str() ) ); // Throw up the saving message... common->Dialog().ShowSaveIndicator( true ); } } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { common->Dialog().ClearDialog( msg ); if( accept ) { idLocalUser* user = session->GetSignInManager().GetMasterLocalUser(); if( user != NULL ) { idPlayerProfile* profile = user->GetProfile(); if( profile != NULL ) { profile->RestoreDefault(); if( menu != NULL ) { menu->UpdateBindingDisplay(); menu->Update(); } } } } return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject* thisObject, const idSWFParmList& parms ) { common->Dialog().ClearDialog( GDM_LEAVE_LOBBY_RET_NEW_PARTY ); return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { common->Dialog().ClearDialog( GDM_CORRUPT_CONTINUE ); return idSWFScriptVar(); }
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) { common->Dialog().ClearDialog( GDM_PLAY_ONLINE_NO_PROFILE ); return idSWFScriptVar(); }