class InventorySlotWrapperTooltip extends AGenericTooltipController
{
	protected var itemDisplayController : weak< InventoryItemDisplayController >;

	protected event OnInitialize()
	{
		super.OnInitialize();
		if( !( itemDisplayController ) )
		{
			itemDisplayController = ( ( InventoryItemDisplayController )( ItemDisplayUtils.SpawnCommonSlotController( this, GetRootWidget(), 'lootSlot' ) ) );
			if( itemDisplayController && itemDisplayController.GetRootWidget() )
			{
				itemDisplayController.GetRootWidget().SetVAlign( inkEVerticalAlign.Top );
				itemDisplayController.GetRootWidget().SetHAlign( inkEHorizontalAlign.Left );
			}
		}
	}

	public function SetData( const itemData : ref< InventoryItemData >, isSelected : Bool )
	{
		SetData( InventoryTooltipData.FromInventoryItemData( itemData ) );
		itemDisplayController.SetHighlighted( isSelected );
	}

	public function SetData( tooltipData : ATooltipData, isSelected : Bool )
	{
		SetData( tooltipData );
		itemDisplayController.SetHighlighted( isSelected );
	}

	public override function SetData( tooltipData : ATooltipData )
	{
		var data : InventoryTooltipData;
		data = ( ( InventoryTooltipData )( tooltipData ) );
		itemDisplayController.SetHUDMode( true );
		itemDisplayController.Setup( data );
	}

}

