class RadialMenuHubGameController extends gameuiMenuGameController
{
	private var m_menusData : MenuDataBuilder;
	private var m_menuEventDispatcher : weak< inkMenuEventDispatcher >;
	private var m_menuCtrl : weak< RadialMenuHubLogicController >;
	private var m_metaCtrl : weak< MetaQuestLogicController >;
	private var m_subMenuCtrl : weak< RadialSubMenuPanelLogicController >;
	private var m_timeCtrl : weak< RadialHubTimeSkipController >;
	private var m_player : weak< PlayerPuppet >;
	private var m_playerDevSystem : PlayerDevelopmentSystem;
	private var m_transaction : TransactionSystem;
	private var m_playerStatsBlackboard : weak< IBlackboard >;
	private var m_hubMenuBlackboard : weak< IBlackboard >;
	private var m_characterCredListener : CallbackHandle;
	private var m_characterLevelListener : CallbackHandle;
	private var m_characterCurrentXPListener : CallbackHandle;
	private var m_characterCredPointsListener : CallbackHandle;
	private var m_weightListener : CallbackHandle;
	private var m_maxWeightListener : CallbackHandle;
	private var m_submenuHiddenListener : CallbackHandle;
	private var m_metaQuestStatusListener : CallbackHandle;
	private var m_journalManager : weak< JournalManager >;
	private var m_trackedEntry : weak< JournalQuestObjective >;
	private var m_trackedPhase : weak< JournalQuestPhase >;
	private var m_trackedQuest : weak< JournalQuest >;
	private editable var m_notificationRoot : inkWidgetRef;
	private editable var m_buttonHintsManagerRef : inkWidgetRef;
	private editable var m_bgFluff : inkWidgetRef;
	private var m_dataManager : PlayerDevelopmentDataManager;
	private var m_buttonHintsController : weak< ButtonHints >;
	private editable var m_gameTimeContainer : inkWidgetRef;
	private var m_gameTimeController : weak< gameuiTimeDisplayLogicController >;
	private var m_inventoryListener : InventoryScriptListener;
	private var m_callback : CurrencyUpdateCallback;
	var m_hubMenuInstanceID : Uint32;

	protected event OnInitialize()
	{
		var setMenuModeEvent : inkMenuLayer_SetMenuModeEvent;
		var data : JournalMetaQuestScriptedData;
		var status : MetaQuestStatus;
		m_player = ( ( PlayerPuppet )( GetPlayerControlledObject() ) );
		m_playerDevSystem = ( ( PlayerDevelopmentSystem )( GameInstance.GetScriptableSystemsContainer( ( ( GameObject )( GetOwnerEntity() ) ).GetGame() ).Get( 'PlayerDevelopmentSystem' ) ) );
		m_transaction = ( ( TransactionSystem )( GameInstance.GetTransactionSystem( ( ( GameObject )( GetOwnerEntity() ) ).GetGame() ) ) );
		m_dataManager = new PlayerDevelopmentDataManager;
		m_dataManager.Initialize( ( ( PlayerPuppet )( GameInstance.GetPlayerSystem( GetPlayerControlledObject().GetGame() ).GetLocalPlayerMainGameObject() ) ), this );
		SpawnFromExternal( GetRootWidget(), R"base\gameplay\gui\common\disassemble_manager.inkwidget", 'Root' );
		SpawnFromExternal( inkWidgetRef.Get( m_bgFluff ), R"base\gameplay\gui\fullscreen\common\general_fluff.inkwidget", 'Root' );
		setMenuModeEvent = new inkMenuLayer_SetMenuModeEvent;
		setMenuModeEvent.Init( inkMenuMode.HubMenu, inkMenuState.Enabled );
		QueueBroadcastEvent( setMenuModeEvent );
		SpawnFromLocal( inkWidgetRef.Get( m_notificationRoot ), 'notification_layer' );
		m_journalManager = GameInstance.GetJournalManager( ( ( GameObject )( GetOwnerEntity() ) ).GetGame() );
		m_trackedEntry = ( ( JournalQuestObjective )( m_journalManager.GetTrackedEntry() ) );
		m_trackedPhase = ( ( JournalQuestPhase )( m_journalManager.GetParentEntry( m_trackedEntry ) ) );
		m_trackedQuest = ( ( JournalQuest )( m_journalManager.GetParentEntry( m_trackedPhase ) ) );
		m_menuCtrl = ( ( RadialMenuHubLogicController )( GetControllerByType( 'RadialMenuHubLogicController' ) ) );
		m_subMenuCtrl = ( ( RadialSubMenuPanelLogicController )( GetControllerByType( 'RadialSubMenuPanelLogicController' ) ) );
		m_metaCtrl = ( ( MetaQuestLogicController )( GetControllerByType( 'MetaQuestLogicController' ) ) );
		m_timeCtrl = ( ( RadialHubTimeSkipController )( GetControllerByType( 'RadialHubTimeSkipController' ) ) );
		InitMenusData();
		m_timeCtrl.Init( GameTimeUtils.CanPlayerTimeSkip( m_player ), GameInstance.GetTimeSystem( m_player.GetGame() ), this );
		m_subMenuCtrl.SetActive( true, true );
		m_subMenuCtrl.HideName( true );
		m_subMenuCtrl.SetHubMenuInstanceID( m_hubMenuInstanceID );
		data = m_journalManager.GetMetaQuestData( gamedataMetaQuest.MetaQuest1 );
		status.MetaQuest1Hidden = data.hidden;
		status.MetaQuest1Value = ( ( Int32 )( data.percent ) );
		status.MetaQuest1Description = data.text;
		data = m_journalManager.GetMetaQuestData( gamedataMetaQuest.MetaQuest2 );
		status.MetaQuest2Hidden = data.hidden;
		status.MetaQuest2Value = ( ( Int32 )( data.percent ) );
		status.MetaQuest2Description = data.text;
		data = m_journalManager.GetMetaQuestData( gamedataMetaQuest.MetaQuest3 );
		status.MetaQuest3Hidden = data.hidden;
		status.MetaQuest3Value = ( ( Int32 )( data.percent ) );
		status.MetaQuest3Description = data.text;
		m_metaCtrl.SetMetaQuests( status );
		m_buttonHintsController = ( ( ButtonHints )( SpawnFromExternal( inkWidgetRef.Get( m_buttonHintsManagerRef ), R"base\gameplay\gui\common\buttonhints.inkwidget", 'Root' ).GetController() ) );
		m_buttonHintsController.AddButtonHint( 'back', GetLocalizedText( "Common-Access-Close" ) );
		m_buttonHintsController.AddButtonHint( 'select', GetLocalizedText( "UI-ScriptExports-Select0" ) );
		RegisterToGlobalInputCallback( 'OnPostOnRelease', this, 'OnButtonRelease' );
		RegisterToGlobalInputCallback( 'OnPostOnRelative', this, 'OnGlobalPostRelative' );
		RegisterToGlobalInputCallback( 'OnPostOnAxis', this, 'OnGlobalPostAxis' );
		SetupBlackboards();
		TimeDilationHelper.SetTimeDilationWithProfile( m_player, "hubMenu", true, true );
		GameInstance.GetGodModeSystem( m_player.GetGame() ).AddGodMode( m_player.GetEntityID(), gameGodModeType.Invulnerable, 'HubMenu' );
		m_gameTimeController = ( ( gameuiTimeDisplayLogicController )( inkWidgetRef.GetController( m_gameTimeContainer ) ) );
		PlayLibraryAnimation( 'menu_intro' );
		PlaySound( 'GameMenu', 'OnOpen' );
		UpdateTimeDisplay();
		m_menuCtrl.SetWindowSize( GameInstance.GetUISystem( m_player.GetGame() ).GetCurrentWindowSize() );
	}

	private function SetupBlackboards()
	{
		var requestStatsEvent : RequestStatsBB;
		m_playerStatsBlackboard = GetBlackboardSystem().Get( GetAllBlackboardDefs().UI_PlayerStats );
		m_characterLevelListener = m_playerStatsBlackboard.RegisterDelayedListenerInt( GetAllBlackboardDefs().UI_PlayerStats.Level, this, 'OnCharacterLevelUpdated' );
		m_playerStatsBlackboard.SignalInt( GetAllBlackboardDefs().UI_PlayerStats.Level );
		m_characterCurrentXPListener = m_playerStatsBlackboard.RegisterDelayedListenerInt( GetAllBlackboardDefs().UI_PlayerStats.CurrentXP, this, 'OnCharacterLevelCurrentXPUpdated' );
		m_playerStatsBlackboard.SignalInt( GetAllBlackboardDefs().UI_PlayerStats.CurrentXP );
		m_characterCredListener = m_playerStatsBlackboard.RegisterDelayedListenerInt( GetAllBlackboardDefs().UI_PlayerStats.StreetCredLevel, this, 'OnCharacterStreetCredLevelUpdated' );
		m_playerStatsBlackboard.SignalInt( GetAllBlackboardDefs().UI_PlayerStats.StreetCredLevel );
		m_characterCredPointsListener = m_playerStatsBlackboard.RegisterDelayedListenerInt( GetAllBlackboardDefs().UI_PlayerStats.StreetCredPoints, this, 'OnCharacterStreetCredPointsUpdated' );
		m_playerStatsBlackboard.SignalInt( GetAllBlackboardDefs().UI_PlayerStats.StreetCredPoints );
		m_maxWeightListener = m_playerStatsBlackboard.RegisterDelayedListenerInt( GetAllBlackboardDefs().UI_PlayerStats.weightMax, this, 'OnPlayerMaxWeightUpdated' );
		m_playerStatsBlackboard.SignalInt( GetAllBlackboardDefs().UI_PlayerStats.weightMax );
		m_weightListener = m_playerStatsBlackboard.RegisterDelayedListenerFloat( GetAllBlackboardDefs().UI_PlayerStats.currentInventoryWeight, this, 'OnPlayerWeightUpdated' );
		m_hubMenuBlackboard = GetBlackboardSystem().Get( GetAllBlackboardDefs().UI_TopbarHubMenu );
		m_submenuHiddenListener = m_hubMenuBlackboard.RegisterListenerBool( GetAllBlackboardDefs().UI_TopbarHubMenu.IsSubmenuHidden, this, 'OnSubmenuHiddenUpdated' );
		m_metaQuestStatusListener = m_hubMenuBlackboard.RegisterListenerVariant( GetAllBlackboardDefs().UI_TopbarHubMenu.MetaQuestStatus, this, 'OnMetaQuestStatusUpdated' );
		m_subMenuCtrl.HandleCharacterCurrencyUpdated( m_transaction.GetItemQuantity( m_player, ItemID.CreateQuery( T"Items.money" ) ) );
		requestStatsEvent = new RequestStatsBB;
		requestStatsEvent.Set( m_player );
		m_playerDevSystem.QueueRequest( requestStatsEvent );
		m_callback = new CurrencyUpdateCallback;
		m_callback.m_playerStatsUIHolder = m_subMenuCtrl;
		m_callback.m_transactionSystem = m_transaction;
		m_callback.m_player = m_player;
		m_inventoryListener = GameInstance.GetTransactionSystem( m_player.GetGame() ).RegisterInventoryListener( m_player, m_callback );
		if( m_playerStatsBlackboard.GetBool( GetAllBlackboardDefs().UI_PlayerStats.isReplacer ) )
		{
			m_subMenuCtrl.SetRepacerMode();
		}
	}

	protected event OnTimeSkipOpenedEvent( e : TimeSkipOpenedEvent )
	{
		m_menuCtrl.SetTimeSkipOpened( true );
	}

	protected event OnTimeSkipClosedEvent( e : TimeSkipClosedEvent )
	{
		m_menuCtrl.SetTimeSkipOpened( false );
	}

	protected event OnTimeSkipHoverOverEvent( e : TimeSkipHoverOverEvent )
	{
		m_menuCtrl.SetButtonHoverOver( -2 );
	}

	protected event OnTimeSkipHoverOutEvent( e : TimeSkipHoverOutEvent )
	{
		m_menuCtrl.SetButtonHoverOut( -2 );
	}

	protected event OnMenuButtonHoverOverEvent( e : MenuButtonHoverOverEvent )
	{
		m_menuCtrl.SetButtonHoverOver( e.buttonId );
	}

	protected event OnMenuButtonHoverOutEvent( e : MenuButtonHoverOutEvent )
	{
		m_menuCtrl.SetButtonHoverOut( e.buttonId );
	}

	protected event OnMetaQuestStatusUpdated( value : Variant )
	{
		var status : MetaQuestStatus;
		status = ( ( MetaQuestStatus )value );
		m_metaCtrl.SetMetaQuests( status );
	}

	protected event OnCharacterLevelUpdated( value : Int32 )
	{
		m_subMenuCtrl.HandleCharacterLevelUpdated( value );
	}

	protected event OnCharacterLevelCurrentXPUpdated( value : Int32 )
	{
		var remainingXP : Int32;
		remainingXP = m_playerDevSystem.GetRemainingExpForLevelUp( m_player, gamedataProficiencyType.Level );
		m_subMenuCtrl.HandleCharacterLevelCurrentXPUpdated( value, remainingXP );
	}

	protected event OnCharacterStreetCredLevelUpdated( value : Int32 )
	{
		m_subMenuCtrl.HandleCharacterStreetCredLevelUpdated( value );
	}

	protected event OnDropQueueUpdatedEvent( evt : DropQueueUpdatedEvent )
	{
		var i : Int32;
		var item : gameItemData;
		var dropQueue : array< ItemModParams >;
		var result : Float;
		dropQueue = evt.m_dropQueue;
		for( i = 0; i < dropQueue.Size(); i += 1 )
		{
			item = GameInstance.GetTransactionSystem( m_player.GetGame() ).GetItemData( m_player, dropQueue[ i ].itemID );
			result += ( item.GetStatValueByType( gamedataStatType.Weight ) * ( ( Float )( dropQueue[ i ].quantity ) ) );
		}
		HandlePlayerWeightUpdated( result );
	}

	protected event OnCharacterStreetCredPointsUpdated( value : Int32 )
	{
		var remainingXP : Int32;
		remainingXP = m_playerDevSystem.GetRemainingExpForLevelUp( m_player, gamedataProficiencyType.StreetCred );
		m_subMenuCtrl.HandleCharacterStreetCredPointsUpdated( value, remainingXP );
	}

	protected event OnPlayerMaxWeightUpdated( value : Int32 )
	{
		var carryCapacity : Int32;
		var gameInstance : GameInstance;
		gameInstance = ( ( weak< weak< GameObject > > )( m_player ) ).GetGame();
		carryCapacity = ( ( Int32 )( GameInstance.GetStatsSystem( gameInstance ).GetStatValue( m_player.GetEntityID(), gamedataStatType.CarryCapacity ) ) );
		m_subMenuCtrl.HandlePlayerMaxWeightUpdated( carryCapacity, m_player.m_curInventoryWeight );
		if( RoundF( m_player.m_curInventoryWeight ) >= carryCapacity )
		{
			PlayLibraryAnimation( 'overburden' );
		}
	}

	protected event OnPlayerWeightUpdated( value : Float )
	{
		HandlePlayerWeightUpdated();
	}

	public function HandlePlayerWeightUpdated( optional dropQueueWeight : Float )
	{
		var carryCapacity : Int32;
		var gameInstance : GameInstance;
		gameInstance = ( ( weak< weak< GameObject > > )( m_player ) ).GetGame();
		carryCapacity = ( ( Int32 )( GameInstance.GetStatsSystem( gameInstance ).GetStatValue( m_player.GetEntityID(), gamedataStatType.CarryCapacity ) ) );
		m_subMenuCtrl.HandlePlayerWeightUpdated( m_player.m_curInventoryWeight - dropQueueWeight, carryCapacity );
	}

	protected event OnSubmenuHiddenUpdated( value : Bool )
	{
		m_subMenuCtrl.SetActive( m_subMenuCtrl.GetActive(), value );
	}

	private function InitMenusData()
	{
		var emptyData : MenuData;
		var psmBlackboard : IBlackboard;
		var isCarftingAvailable : Bool;
		isCarftingAvailable = true;
		psmBlackboard = m_player.GetPlayerStateMachineBlackboard();
		isCarftingAvailable = ( psmBlackboard.GetInt( GetAllBlackboardDefs().PlayerStateMachine.Combat ) != ( ( Int32 )( gamePSMCombat.InCombat ) ) ) && !( StatusEffectSystem.ObjectHasStatusEffectWithTag( m_player, 'NoCrafting' ) );
		m_menusData = MenuDataBuilder.Make().Add( HubMenuItems.Inventory, HubMenuItems.Inventory, 'inventory_screen', 'ico_inventory', 'UI-PanelNames-INVENTORY' ).Add( HubMenuItems.Map, HubMenuItems.Map, 'world_map', 'ico_map', 'UI-PanelNames-MAP', NULL, GameInstance.GetQuestsSystem( m_player.GetGame() ).GetFact( 'map_blocked' ) ).Add( HubMenuItems.Character, HubMenuItems.Character, 'new_perks', 'ico_character', 'UI-PanelNames-CHARACTER' ).Add( HubMenuItems.Journal, HubMenuItems.Journal, 'quest_log', 'ico_journal', 'UI-PanelNames-JOURNAL' ).Add( HubMenuItems.Codex, HubMenuItems.Codex, 'codex', 'ico_data', 'UI-PanelNames-CODEX', CodexUserData.Make( CodexDataSource.Codex ) ).Add( HubMenuItems.Crafting, HubMenuItems.Inventory, 'crafting_main', 'ico_cafting', 'Gameplay-RPG-Skills-CraftingName', , !( isCarftingAvailable ) ).Add( HubMenuItems.Stats, HubMenuItems.Character, 'temp_stats', 'ico_stats_hub', 'UI-PanelNames-STATS' ).Add( HubMenuItems.Phone, HubMenuItems.Journal, 'phone', 'ico_phone', 'UI-PanelNames-PHONE' ).Add( HubMenuItems.Tarot, HubMenuItems.Codex, 'tarot_main', 'ico_tarot_hub', 'UI-PanelNames-TAROT', NULL, !( GameInstance.GetQuestsSystem( m_player.GetGame() ).GetFact( 'q101_done' ) ) ).Add( HubMenuItems.Shards, HubMenuItems.Codex, 'shards', 'ico_shards_hub', 'UI-PanelNames-SHARDS', CodexUserData.Make( CodexDataSource.Onscreen ) ).Add( HubMenuItems.Backpack, HubMenuItems.Inventory, 'backpack', 'ico_backpack', 'UI-PanelNames-BACKPACK' ).Add( HubMenuItems.Cyberware, HubMenuItems.Inventory, 'cyberware_equip', 'ico_cyberware', 'UI-PanelNames-CYBERWARE' );
		m_menuCtrl.SetMenusData( m_menusData, !( GameInstance.GetQuestsSystem( m_player.GetGame() ).GetFact( 'q101_done' ) ), GameInstance.GetQuestsSystem( m_player.GetGame() ).GetFact( 'map_blocked' ), m_dataManager.GetAttributePoints(), m_dataManager.GetPerkPoints() );
		emptyData = m_menusData.GetData( ( ( Int32 )( HubMenuItems.Inventory ) ) );
		m_subMenuCtrl.AddMenus( emptyData, m_menusData.Get() );
		m_subMenuCtrl.SetMenusData( m_menusData );
	}

	protected event OnCyberwareModsRequest( evt : CyberwareTabModsRequest )
	{
		m_subMenuCtrl.OpenModsTabExternal( evt );
	}

	protected event OnSetMenuEventDispatcher( menuEventDispatcher : weak< inkMenuEventDispatcher > )
	{
		m_menuEventDispatcher = menuEventDispatcher;
		m_menuEventDispatcher.RegisterToEvent( 'OnHubMenuInstanceData', this, 'OnHubMenuInstanceData' );
	}


	var m_previousRequest : OpenMenuRequest;
	var m_currentRequest : OpenMenuRequest;

	protected event OnBackActionCallback( evt : BackActionCallback )
	{
		if( StatusEffectSystem.ObjectHasStatusEffectWithTag( GetPlayerControlledObject(), 'LockInHubMenu' ) )
		{
			return false;
		}
		if( ( m_currentRequest.m_jumpBack && m_previousRequest ) && ( m_currentRequest != m_previousRequest ) )
		{
			QueueBroadcastEvent( m_previousRequest );
			m_currentRequest = NULL;
		}
		else
		{
			m_menuEventDispatcher.SpawnEvent( 'OnCloseHubMenu' );
		}
	}

	protected event OnOpenMenuRequest( evt : OpenMenuRequest )
	{
		var menuItemData : MenuItemData;
		if( ( evt.m_hubMenuInstanceID > ( ( Uint32 )( 0 ) ) ) && ( evt.m_hubMenuInstanceID != m_hubMenuInstanceID ) )
		{
			return false;
		}
		if( m_currentRequest )
		{
			m_previousRequest = m_currentRequest;
		}
		m_currentRequest = evt;
		menuItemData = new MenuItemData;
		if( evt.m_menuName != '' )
		{
			menuItemData.m_menuData = m_menusData.GetData( evt.m_menuName );
		}
		else
		{
			menuItemData.m_menuData = evt.m_eventData;
		}
		if( evt.m_eventData.m_overrideDefaultUserData )
		{
			menuItemData.m_menuData.userData = evt.m_eventData.userData;
			menuItemData.m_menuData.m_overrideSubMenuUserData = evt.m_eventData.m_overrideSubMenuUserData;
		}
		if( evt.m_isMainMenu )
		{
			m_subMenuCtrl.SetActive( true );
			m_menuCtrl.SetActive( false );
			UnregisterFromGlobalInputCallback( 'OnPostOnRelease', this, 'OnButtonRelease' );
		}
		if( GetFact( m_player.GetGame(), 'PendingRespec' ) == 1 )
		{
			EquipmentSystem.UnequipPrereqItems( m_player );
			SetFactValue( m_player.GetGame(), 'PendingRespec', 0 );
		}
		m_menuEventDispatcher.SpawnEvent( 'OnSelectMenuItem', menuItemData );
		m_buttonHintsController.ClearButtonHints();
	}

	protected event OnButtonRelease( evt : inkPointerEvent )
	{
		if( evt.IsAction( 'back' ) )
		{
			m_menuEventDispatcher.SpawnEvent( 'OnCloseHubMenu' );
			PlaySound( 'GameMenu', 'OnClose' );
		}
	}

	protected event OnUninitialize()
	{
		var setMenuModeEvent : inkMenuLayer_SetMenuModeEvent;
		var blackboardSystem : BlackboardSystem;
		var blackboard : IBlackboard;
		setMenuModeEvent = new inkMenuLayer_SetMenuModeEvent;
		setMenuModeEvent.Init( inkMenuMode.HubMenu, inkMenuState.Disabled );
		QueueBroadcastEvent( setMenuModeEvent );
		UnregisterFromGlobalInputCallback( 'OnPostOnRelease', this, 'OnButtonRelease' );
		TimeDilationHelper.SetTimeDilationWithProfile( m_player, "hubMenu", false, false );
		GameInstance.GetGodModeSystem( m_player.GetGame() ).RemoveGodMode( m_player.GetEntityID(), gameGodModeType.Invulnerable, 'HubMenu' );
		m_playerStatsBlackboard.UnregisterDelayedListener( GetAllBlackboardDefs().UI_PlayerStats.Level, m_characterLevelListener );
		m_playerStatsBlackboard.UnregisterDelayedListener( GetAllBlackboardDefs().UI_PlayerStats.CurrentXP, m_characterCurrentXPListener );
		m_playerStatsBlackboard.UnregisterDelayedListener( GetAllBlackboardDefs().UI_PlayerStats.StreetCredLevel, m_characterCredListener );
		m_playerStatsBlackboard.UnregisterDelayedListener( GetAllBlackboardDefs().UI_PlayerStats.StreetCredPoints, m_characterCredPointsListener );
		m_hubMenuBlackboard.UnregisterListenerBool( GetAllBlackboardDefs().UI_TopbarHubMenu.IsSubmenuHidden, m_submenuHiddenListener );
		m_hubMenuBlackboard.UnregisterListenerVariant( GetAllBlackboardDefs().UI_TopbarHubMenu.MetaQuestStatus, m_metaQuestStatusListener );
		blackboardSystem = GetBlackboardSystem();
		blackboard = blackboardSystem.Get( GetAllBlackboardDefs().UI_QuickSlotsData );
		blackboard.SetBool( GetAllBlackboardDefs().UI_QuickSlotsData.dpadHintRefresh, true );
		blackboard.SignalBool( GetAllBlackboardDefs().UI_QuickSlotsData.dpadHintRefresh );
		m_menuEventDispatcher.UnregisterFromEvent( 'OnHubMenuInstanceData', this, 'OnHubMenuInstanceData' );
		GameInstance.GetTransactionSystem( m_player.GetGame() ).UnregisterInventoryListener( m_player, m_inventoryListener );
		m_inventoryListener = NULL;
	}

	private function UpdateTimeDisplay()
	{
		var timeSystem : TimeSystem;
		var isGlitchEnabled : Bool;
		timeSystem = GameInstance.GetTimeSystem( GetPlayerControlledObject().GetGame() );
		if( timeSystem )
		{
			isGlitchEnabled = GameTimeUtils.IsTimeDisplayGlitched( ( ( PlayerPuppet )( GetPlayerControlledObject() ) ) );
			m_gameTimeController.UpdateTime( isGlitchEnabled, timeSystem.GetGameTime() );
		}
	}

	protected event OnHubMenuInstanceData( userData : IScriptable )
	{
		var hubMenuInstanceData : HubMenuInstanceData;
		hubMenuInstanceData = ( ( HubMenuInstanceData )( userData ) );
		m_hubMenuInstanceID = hubMenuInstanceData.m_ID;
	}

}

