Ejemplo n.º 1
0
    void BackMajorOpenPanel()
    {
        if (currentScene == GameLibrary.UI_Major && null != Globe.backPanelParameter)
        {
            switch ((UIPanleID)Globe.backPanelParameter[0])// int.Parse(Globe.backPanelParameter[0].ToString())
            {
            case UIPanleID.UIActivity:
                UI_Setting.GetInstance().OnEnchantBtnClick();
                break;

            case UIPanleID.UIPvP:
                UI_Setting.GetInstance().OnArenaABtnClick();
                break;

            case UIPanleID.EquipDevelop:
                UI_Setting.GetInstance().OnEquipBtn();
                Globe.backPanelParameter = null;
                break;

            case UIPanleID.UILevel:
                object[] openParams = new object[] { OpenLevelType.ByIDOpen, (int)Globe.backPanelParameter[1] };
                Control.ShowGUI(UIPanleID.UILevel, EnumOpenUIType.OpenNewCloseOld, false, openParams);
                break;

            default:
                //Control.ShowGUI(Globe.backPanelParameter[0].ToString());
                Control.ShowGUI((UIPanleID)(int.Parse(Globe.backPanelParameter[0].ToString())), EnumOpenUIType.OpenNewCloseOld, false);
                Globe.backPanelParameter = null;
                break;
            }
        }
    }
Ejemplo n.º 2
0
    void ChangeVSelect()
    {
        currentbutton.color = new Color(1, 1, 1);
        switch (mVIndex)
        {
        case 0:
            currentbutton = UI_Setting.GetInstance().shrinkBtn.GetComponent <UISprite>();   //功能
            break;

        case 1:
            currentbutton = UI_Setting.GetInstance().bagBtn.GetComponent <UISprite>();   //物品,背包
            break;

        case 2:
            currentbutton = UI_Setting.GetInstance().eventDungBtn.GetComponent <UISprite>();   //布阵
            break;

        case 3:
            currentbutton = UI_Setting.GetInstance().heroBtn.GetComponent <UISprite>();   //英雄
            break;

        case 4:
            currentbutton = UI_Setting.GetInstance().altarBtn.GetComponent <UISprite>();   //祭坛
            break;
        }
        str = "mVertical = " + mVerticalIndex;
        currentbutton.color = new Color(1, 0, 0);
    }
Ejemplo n.º 3
0
    void ChangeHSelect()
    {
        currentbutton.color = new Color(1, 1, 1);
        switch (mVerticalIndex)
        {
        case 0:
            currentbutton = UI_Setting.GetInstance().shrinkBtn.GetComponent <UISprite>();   //功能
            break;

        case 1:
            currentbutton = UI_Setting.GetInstance().shopBtn.GetComponent <UISprite>();   //商店
            break;

        case 2:
            currentbutton = UI_Setting.GetInstance().ectypeBtn.GetComponent <UISprite>();   //副本
            break;

        case 3:
            currentbutton = UI_Setting.GetInstance().taskBtn.GetComponent <UISprite>();   //任务
            break;

        case 4:
            currentbutton = UI_Setting.GetInstance().enchantBtn.GetComponent <UISprite>();   //附魔
            break;
        }
        str = "mVertical = " + mVerticalIndex;
        currentbutton.color = new Color(1, 0, 0);
    }
Ejemplo n.º 4
0
    void OnOK()
    {
        // GUISingleButton singlebutton = currentbutton.GetComponent<GUISingleButton>();
        //if(singlebutton !=null)
        // singlebutton.onClick();
        str = "onOk = ";
        if (!bVertical)
        {
            switch (mVerticalIndex)
            {
            case 0:
                UI_Setting.GetInstance().OnShrinkClick();    //功能
                break;

            case 1:
                UI_Setting.GetInstance().OnBagClick();     //物品,背包
                break;

            case 2:
                UI_Setting.GetInstance().OnEventDungBtnClick();     //布阵
                break;

            case 3:
                UI_Setting.GetInstance().OnHeroBtnClick();     //英雄
                break;

            case 4:
                UI_Setting.GetInstance().OnAltarClick();     //祭坛
                break;
            }
        }
        else
        {
            switch (mVerticalIndex)
            {
            case 0:
                UI_Setting.GetInstance().OnShrinkClick();     //功能
                break;

            case 1:
                UI_Setting.GetInstance().OnShopBtnClick();     //商店
                break;

            case 2:
                UI_Setting.GetInstance().ectypeBtn.GetComponent <UISprite>();    //副本
                break;

            case 3:
                UI_Setting.GetInstance().taskBtn.GetComponent <UISprite>();    //任务
                break;

            case 4:
                UI_Setting.GetInstance().enchantBtn.GetComponent <UISprite>();    //附魔
                break;
            }
        }
    }
Ejemplo n.º 5
0
    void Start()
    {
        uiarray[0] = UI_Setting.GetInstance();
        TweenAlpha.Begin(gameObject, 0.2f, 0.5f);

        root  = NGUITools.GetRoot(gameObject).GetComponent <UIRoot>();
        ratio = NGUITools.screenSize.y / root.manualHeight;
        range = ratio * range;
    }
Ejemplo n.º 6
0
    public void SetNewChatHint(ChatData chatData)
    {
        chatBtn      = transform.Find("ChatBtn").GetComponent <GUISingleButton>();
        channelLabel = transform.Find("Channel").GetComponent <UILabel>();
        contentLabel = transform.Find("Content").GetComponent <UILabel>();
        //nickNameLabel = transform.Find("NickName").GetComponent<UILabel>();
        sprite = transform.Find("Sprite").GetComponent <UISprite>();
        if (chatData == null)
        {
            //channelLabel.gameObject.SetActive(false);
            //contentLabel.gameObject.SetActive(false);
            //sprite.gameObject.SetActive(false);
            SetChatPosition(false);
            //chatEffect.gameObject.SetActive(false);
            return;
        }
        else if (chatData != null)
        {
            //channelLabel.gameObject.SetActive(true);
            //contentLabel.gameObject.SetActive(true);
            SetChatPosition(UI_Setting.GetInstance().isShrink);
            //chatEffect.gameObject.SetActive(true);
        }
        chatEffect.gameObject.SetActive(GetNotReadCount() > 0?true:false);
        switch (chatData.Type)
        {
        case ChatType.WorldChat:
            channelLabel.text = "[fdee03]" + "【世界】" + "[-]";
            break;

        case ChatType.SocietyChat:
            channelLabel.text = "[0dd0f7]" + "【公会】" + "[-]";
            break;

        case ChatType.PrivateChat:
            channelLabel.text = "[db4bff]" + "【私聊】" + "[-]";
            break;

        case ChatType.NearbyChat:
            channelLabel.text = "附近";
            break;

        case ChatType.TroopsChat:
            channelLabel.text = "队伍";
            break;

        case ChatType.SystemChat:
            channelLabel.text = "系统";
            break;
        }
        //nickNameLabel.text = chatData.NickName;
        contentLabel.text = chatData.NickName + ":" + "[26c926]" + chatData.ChatContent + "[-]";
    }
Ejemplo n.º 7
0
 /// <summary>
 /// 红点变更通知
 /// </summary>
 public void NotifyChange()
 {
     //if (NotifyRedChangeEvent != null && Singleton<SceneManage>.Instance.Current == EnumSceneID.UI_MajorCity01&& Singleton<SceneManage>.Instance.State== EnumObjectState.Ready)
     //{
     //    if (Control.GetGUI(GameLibrary.UISetting) != null)
     //    {
     if (UI_Setting.GetInstance() != null)
     {
         UI_Setting.GetInstance().SetMainSettingRed(redList);
     }
     //         NotifyRedChangeEvent(redList);
     //    }
     //}
 }
Ejemplo n.º 8
0
 private void EnterBtnOnclick()
 {
     if (vo.leave_for != 0)
     {
         Debug.Log("界面ID为0");
         if (vo.id == 10)
         {
             if (Control.GetUI <GUIBase>(UIPanleID.UIActivities) != null)
             {
                 UIActivities.Instance.ChangeIndex(1);
             }
         }
         else if (vo.id == 2)
         {
             Control.ShowGUI(UIPanleID.UIGoldHand, EnumOpenUIType.DefaultUIOrSecond);
         }
         else if (vo.id == 7)
         {
             object[] openParams = new object[] { OpenLevelType.ByIDOpen, 0 };
             Control.ShowGUI(UIPanleID.UILevel, EnumOpenUIType.OpenNewCloseOld, false, openParams);
         }
         else if (vo.id == 13)
         {
             UI_Setting.GetInstance().OnEquipBtn();
         }
         else if (vo.id == 8 || vo.id == 9)
         {
             UI_Setting.GetInstance().OnEnchantBtnClick();
         }
         else if (vo.id == 4)
         {
             //Control.ShowGUI(vo.leave_for);
             object[] openParams = new object[] { OpenLevelType.ByIDOpen, playerData.GetInstance().CanEnterMap.Count > 0 ? playerData.GetInstance().CanEnterMap[playerData.GetInstance().CanEnterMap.Count - 1] : 100 };
             Control.ShowGUI(UIPanleID.UILevel, EnumOpenUIType.OpenNewCloseOld, false, openParams);
         }
         else if (vo.id == 11)
         {
             UIPVP.instance.OnAbattoirBtnClick();
         }
         else
         {
             Control.ShowGUI((UIPanleID)vo.leave_for, EnumOpenUIType.OpenNewCloseOld);
         }
     }
 }