Exemplo n.º 1
0
        private void On_Guild_PrepareGuild_Create_Icon_Selected(CUIEvent uiEvent)
        {
            CUIListScript srcWidgetScript = uiEvent.m_srcWidgetScript as CUIListScript;

            if (srcWidgetScript != null)
            {
                int selectedIndex = srcWidgetScript.GetSelectedIndex();
                if (selectedIndex == -1)
                {
                    selectedIndex = 0;
                }
                CUIListElementScript elemenet = srcWidgetScript.GetElemenet(selectedIndex);
                if (elemenet != null)
                {
                    Text component = elemenet.transform.Find("imgIcon/txtIconIdData").GetComponent <Text>();
                    this.m_form.GetWidget(8).GetComponent <Text>().text = component.text;
                    this.m_form.GetWidget(4).GetComponent <Image>().SetSprite(elemenet.transform.Find("imgIcon").GetComponent <Image>());
                    CUIFormScript srcFormScript = uiEvent.m_srcFormScript;
                    if (srcFormScript != null)
                    {
                        srcFormScript.Close();
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void On_Guild_PrepareGuild_Create_Icon_Selected(CUIEvent uiEvent)
        {
            CUIListScript cUIListScript = uiEvent.m_srcWidgetScript as CUIListScript;

            if (cUIListScript == null)
            {
                return;
            }
            int num = cUIListScript.GetSelectedIndex();

            if (num == -1)
            {
                num = 0;
            }
            CUIListElementScript elemenet = cUIListScript.GetElemenet(num);

            if (elemenet == null)
            {
                return;
            }
            Text component  = elemenet.transform.Find("imgIcon/txtIconIdData").GetComponent <Text>();
            Text component2 = this.m_form.GetWidget(8).GetComponent <Text>();

            component2.text = component.text;
            Image component3 = this.m_form.GetWidget(4).GetComponent <Image>();

            component3.SetSprite(elemenet.transform.Find("imgIcon").GetComponent <Image>());
            CUIFormScript srcFormScript = uiEvent.m_srcFormScript;

            if (srcFormScript != null)
            {
                srcFormScript.Close();
            }
        }
Exemplo n.º 3
0
        public void OnGuildPositionConfirmFireMember(ulong uid)
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(Singleton <CPlayerInfoSystem> .GetInstance().sPlayerInfoFormPath);

            if (form != null)
            {
                form.Close();
            }
            this.RequestGuildFireMember(uid);
        }
Exemplo n.º 4
0
        public void OnGuildPositionAppoint(ulong uid, byte position, ulong replaceUid)
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(Singleton <CPlayerInfoSystem> .GetInstance().sPlayerInfoFormPath);

            if (form != null)
            {
                form.Close();
            }
            this.RequestGuildAppointPosition(uid, position, replaceUid);
        }
Exemplo n.º 5
0
        private void OnCloseMysteryShop(CUIEvent uiEvent)
        {
            CUIFormScript mallForm = Singleton <CMallSystem> .GetInstance().m_MallForm;

            if ((mallForm != null) && Singleton <CMallSystem> .GetInstance().m_IsMallFormOpen)
            {
                Singleton <CUIManager> .GetInstance().OpenTips("神秘商店关闭", false, 1f, null, new object[0]);

                this.CloseShop(-1);
                mallForm.Close();
            }
        }
Exemplo n.º 6
0
        public void OnCreateOrAddSuccess(GuildInfo info)
        {
            this.m_Model.CurrentGuildInfo = info;
            if (Singleton <CGuildListView> .GetInstance().IsShow())
            {
                Singleton <CGuildListView> .GetInstance().CloseForm();

                this.m_View.OpenForm();
            }
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm("UGUI/Form/System/Guild/Form_Guild_Preview.prefab");

            if (form != null)
            {
                form.Close();
                this.m_View.OpenForm();
            }
            string[] args = new string[] { info.stBriefInfo.sName };
            Singleton <CUIManager> .GetInstance().OpenTips(Singleton <CTextManager> .GetInstance().GetText("Guild_Join_Success_Tip", args), false, 1f, null, new object[0]);
        }
Exemplo n.º 7
0
        private void OnTagEditEnd(CUIEvent evt)
        {
            CUIFormScript srcFormScript = evt.m_srcFormScript;

            if (srcFormScript == null)
            {
                return;
            }
            this.m_tags.Clear();
            GameObject          widget    = srcFormScript.GetWidget(0);
            CUIToggleListScript component = widget.GetComponent <CUIToggleListScript>();

            bool[] multiSelected = component.GetMultiSelected();
            for (int i = 0; i < component.GetElementAmount(); i++)
            {
                if (multiSelected[i])
                {
                    this.m_tags.Add(i);
                }
            }
            this.UpdateTags();
            srcFormScript.Close();
        }