class FastTravelButtonLogicController extends inkButtonController
{
	private editable var m_districtName : inkTextRef;
	private editable var m_locationName : inkTextRef;
	private editable var m_soundData : SSoundData;
	private var m_isInitialized : Bool;
	private var m_fastTravelPointData : weak< FastTravelPointData >;

	protected event OnInitialize() {}

	protected event OnUninitialize() {}

	public function Initialize( data : FastTravelPointData )
	{
		m_fastTravelPointData = data;
		SetDescription( data );
		m_isInitialized = true;
	}

	public function IsInitialized() : Bool
	{
		return m_isInitialized;
	}

	private function SetDescription( data : FastTravelPointData )
	{
		var pointName : String;
		var districtName : String;
		pointName = TweakDBInterface.GetFastTravelPointRecord( data.GetPointRecord() ).DisplayName();
		districtName = TweakDBInterface.GetFastTravelPointRecord( data.GetPointRecord() ).District().EnumName();
		inkTextRef.SetText( m_districtName, districtName );
		inkTextRef.SetText( m_locationName, pointName );
	}

	public const function GetFastTravelPointData() : FastTravelPointData
	{
		return m_fastTravelPointData;
	}

	public function RegisterAudioCallbacks( gameController : inkGameController )
	{
		RegisterToCallback( 'OnHoverOver', gameController, 'OnButtonHoverOver' );
		RegisterToCallback( 'OnHoverOut', gameController, 'OnButtonHoverOut' );
		RegisterToCallback( 'OnPress', gameController, 'OnButtonPress' );
	}

	public function GetWidgetAudioName() : CName
	{
		return m_soundData.widgetAudioName;
	}

	public function GetOnPressKey() : CName
	{
		return m_soundData.onPressKey;
	}

	public function GetOnReleaseKey() : CName
	{
		return m_soundData.onReleaseKey;
	}

	public function GetOnHoverOverKey() : CName
	{
		return m_soundData.onHoverOverKey;
	}

	public function GetOnHoverOutKey() : CName
	{
		return m_soundData.onHoverOutKey;
	}

}

