public int GetSelectedItem()
 {
     if (m_ScrollInventory.HasSelection())
     {
         return(m_ScrollInventory.GetSelectedItem());
     }
     else
     {
         return(-1);
     }
 }
Exemple #2
0
    public ShopItemId GetSelectedItem()
    {
        //Debug.Log("... m_ScrollInventory.HasSelection(): " + m_ScrollInventory.HasSelection() + " cur index: " + m_ScrollInventory.m_CurrentItemIndex);
        //if(m_ScrollInventory.HasSelection())
        //	Debug.Log( " -------------" + m_ScrollInventory.GetSelectedItem().ItemType + " " + m_ScrollInventory.GetSelectedItem().Id );

        if (m_ScrollInventory.HasSelection())
        {
            return(m_ScrollInventory.GetSelectedItem());
        }
        else
        {
            return(ShopItemId.EmptyId);
        }
    }