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; } } }
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); }
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); }
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; } } }
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; }
private void pictureBoxConfig_Click(object sender, EventArgs e) { var ui = new UI_Setting() { Dock = DockStyle.Fill }; panelWorkspace.Controls.Add(ui); ui.BringToFront(); }
private void Start() { if (instance != null) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(gameObject); }
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 + "[-]"; }
/// <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); // } //} }
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); } } }
protected override void Init() { instance = this; go = GameObject.Find("UI Root").gameObject; tweens.AddRange(bagBtn.GetComponents <UITweener>()); tweens.AddRange(heroBtn.GetComponents <UITweener>()); tweens.AddRange(altarBtn.GetComponents <UITweener>()); tweens.AddRange(ectypeBtn.GetComponents <UITweener>()); tweens.AddRange(embattle.GetComponents <UITweener>()); tweens.AddRange(shopBtn.GetComponents <UITweener>()); tweens.AddRange(enchantBtn.GetComponents <UITweener>()); tweens.AddRange(rankListBtn.GetComponents <UITweener>()); tweens.AddRange(arenaABtn.GetComponents <UITweener>()); tweens.AddRange(systemBtn.GetComponents <UITweener>()); tweens.AddRange(societyBtn.GetComponents <UITweener>()); tweens.AddRange(shoucangBtn.GetComponents <UITweener>()); if (EquipBtn != null) { tweens.AddRange(EquipBtn.GetComponents <UITweener>()); } //顶层按钮 tweensTop.AddRange(taskBtn.GetComponents <UITweener>()); tweensTop.AddRange(friendBtn.GetComponents <UITweener>()); tweensTop.AddRange(welfareBtn.GetComponents <UITweener>()); tweensTop.AddRange(mailBtn.GetComponents <UITweener>()); sysTemTweenP = transform.Find("SystemSetting").GetComponent <TweenPosition>(); sysTemTweenA = transform.Find("SystemSetting").GetComponent <TweenAlpha>(); Shrink = transform.Find("ShrinkTopBtn").GetComponent <UISprite>(); mark = transform.Find("SystemSetting/Mark").GetComponent <UISprite>(); yinyueSwitch = transform.Find("SystemSetting/YinyueSwitch").GetComponent <GUISingleButton>(); yinxiaoSwitch = transform.Find("SystemSetting/YinxiaoSwitch").GetComponent <GUISingleButton>(); shrinkBtn.GetComponentInChildren <UIPlaySound>(); isShrink = false; shrinkBtn.onClick = OnShrinkClick; embattle.onClick = OnEmbattle; bagBtn.onClick = OnBagClick; heroBtn.onClick = OnHeroBtnClick; taskBtn.onClick = OnTaskBtn; altarBtn.onClick = OnAltarClick; //expBar.state = ProgressState.STRING; //expBar.InValue(800f, 1000f); //expBar.InValue(int.Parse(playerData.GetInstance().selfData.exprience.ToString()), int.Parse(playerData.GetInstance().selfData.maxExprience.ToString())); //expBar.onChange = OnExpChange; shopBtn.onClick = OnShopBtnClick; ectypeBtn.onClick = OnEctypeClick; enchantBtn.onClick = OnEnchantBtnClick; rankListBtn.onClick = OnRankListClick; friendBtn.onClick = OnFriendClick; arenaABtn.onClick = OnArenaABtnClick; welfareBtn.onClick = OnWelfareBtnClick; mailBtn.onClick = OnMailOnClick; societyBtn.onClick = OnSocietyClick; systemBtn.onClick = OnSysTemClick; shoucangBtn.onClick = OnShouCangClick; yinyueSwitch.onClick = YinyueSwitchOnClick; yinxiaoSwitch.onClick = YinxiaoSwitchOnClick; shrinkTopBtn.onClick = OnShrinkTopClick; if (EquipBtn != null) { EquipBtn.onClick = OnEquipBtn; } sysTemTweenP.gameObject.SetActive(false); isShrinkTop = false; Singleton <RedPointManager> .Instance.NotifyRedChangeEvent += SetMainSettingRed; }
public override void OnRegister() { base.OnRegister(); uiSetting = UIObj.GetComponent <UI_Setting>(); }