Esempio n. 1
0
    public void ReSetUI()
    {
        m_listAllTypeInfo = ItemDC.GetItemList(m_itemType);

        CreateItems();
        //最后一个卖掉,显示其上一个内容.
        if (nSelectIndex == m_listAllTypeInfo.Count)
        {
            nSelectIndex = m_listAllTypeInfo.Count - 1;
        }

        if (nSelectIndex >= 0 && nSelectIndex < m_listAllTypeInfo.Count)
        {
            ItemTypeInfo info = m_listAllTypeInfo[nSelectIndex];
            if (info != null && info.Num > 0)
            {
                RefreshIntorduct(info);
                return;
            }
        }

        ItemTypeInfo defaultInfo = GetDefaultInfo();

        if (defaultInfo == null)
        {
            U3DUtil.DestroyAllChild(MyHead.ItemParent);
            return;
        }
        RefreshIntorduct(defaultInfo);
    }
Esempio n. 2
0
    public override void WndStart()
    {
        base.WndStart();
        NGUIUtil.SetMainMenuTop(this);
        m_itemType        = ItemType.All;
        m_listAllTypeInfo = ItemDC.GetItemList(ItemType.All);

        BindEvents();
        SetUI();
        if (MainCameraM.s_Instance)
        {
            MainCameraM.s_Instance.EnableDrag(false);
        }
        RegisterHooks();

        NGUIUtil.UpdatePanelValue(MyHead.PanelMask, 1024, 0.15f);
        ShowTogglesAni(0.05f, 0.05f);
        NGUIUtil.TweenGameObjectPosX(MyHead.ScrollLeft, -461, 0.15f, gameObject, "HideAniScroll");
        NGUIUtil.TweenGameObjectPosX(MyHead.ScrollRight, 461, 0.15f);
        InitHudText();
    }
Esempio n. 3
0
 public void ItemUsed()
 {
     m_listAllTypeInfo = ItemDC.GetItemList(ItemType.All);
     ReSetUI();
 }