Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UTGame.UTUIScene_ConnectionStatus


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
/**
 * This scene is displayed while the user is waiting for a connection to finish.  It has code for handling connection
 * error notifications and routing those errors back to its parent scenes.
 *
 * Copyright 2007 Epic Games, Inc. All Rights Reserved
 */
class UTUIScene_ConnectionStatus extends UTUIScene_MessageBox;

/**
 * Called when a user has chosen one of the possible options available to them.
 * Begins hiding the dialog and calls the On
 *
 * @param OptionIdx		Index of the selection option.
 * @param PlayerIndex	Index of the player that selected the option.
 */
function OptionSelected(int OptionIdx, int PlayerIndex)
{
	local OnlineSubsystem OnlineSub;

	Super.OptionSelected(OptionIdx, PlayerIndex);

	// Store a reference to the game interface
	OnlineSub = class'GameEngine'.static.GetOnlineSubsystem();
	
	//Is an online session in progress?
	if (OnlineSub != None && OnlineSub.GameInterface != None && OnlineSub.GameInterface.GetOnlineGameState() != OGS_NoSession)
	{
		// Set the destroy delegate so we can know when that is complete
		OnlineSub.GameInterface.AddDestroyOnlineGameCompleteDelegate(OnDestroyOnlineGameComplete);
		// Now we can destroy the game
		LogInternal("UTUIScene_ConnectionStatus::OptionSelected() - Destroying Online Game");
		
		// kill the pending connection
		OnlineSub.GameInterface.DestroyOnlineGame();
	}

	ConsoleCommand("CANCEL");
}

function OnDestroyOnlineGameComplete(bool bWasSuccessful)
{
	local OnlineSubsystem OnlineSub;
	local UTPlayerController PC;

	ScriptTrace();

	// Store a reference to the game interface
	OnlineSub = class'GameEngine'.static.GetOnlineSubsystem();

	LogInternal("UTUIScene_ConnectionStatus::OnDestroyOnlineGameComplete() bWasSuccesful:"@bWasSuccessful);
	if (OnlineSub != None && OnlineSub.GameInterface != None)
	{
		OnlineSub.GameInterface.ClearDestroyOnlineGameCompleteDelegate(OnDestroyOnlineGameComplete);
	}

	//Clear the cache
	PC = GetUTPlayerOwner();
	if (PC != None && PC.WorldInfo.Game != None)
	{
	   PC.WorldInfo.Game.GameSettings = None;
	}
}

defaultproperties
{
   bExemptFromAutoClose=True
   Begin Object Class=UIComp_Event Name=WidgetEventComponent ObjName=WidgetEventComponent Archetype=UIComp_Event'UTGame.Default__UTUIScene_MessageBox:WidgetEventComponent'
      ObjectArchetype=UIComp_Event'UTGame.Default__UTUIScene_MessageBox:WidgetEventComponent'
   End Object
   EventProvider=WidgetEventComponent
   Name="Default__UTUIScene_ConnectionStatus"
   ObjectArchetype=UTUIScene_MessageBox'UTGame.Default__UTUIScene_MessageBox'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:18:36.000 - Creation time: sk 18-3-2018 10:01:27.313 - Created with UnCodeX