Ejemplo n.º 1
0
    public override void SetComponent()
    {
        this.m_bEquip = (base.GetControl("Button_Button1") as Button);
        this.m_bEquip.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickEquipItem));
        this.m_bClose = (base.GetControl("Button_Button2") as Button);
        this.m_bClose.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickClose));
        ItemTooltipDlg_Second itemTooltipDlg_Second = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMTOOLTIP_SECOND_DLG) as ItemTooltipDlg_Second;

        TsLog.LogWarning("ItemTooltipDlg_Second GetLocation() = {0}", new object[]
        {
            itemTooltipDlg_Second.GetLocation()
        });
        base.SetLocation(GUICamera.width - base.GetSizeX(), GUICamera.height - base.GetSizeY(), itemTooltipDlg_Second.GetLocation().z - 2f);
        TsLog.LogWarning("This GetLocation() = {0}", new object[]
        {
            base.GetLocation()
        });
        ItemEvolution_Dlg itemEvolution_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMEVOLUTION_DLG) as ItemEvolution_Dlg;

        if (itemEvolution_Dlg != null)
        {
            this.m_bEquip.SetEnabled(false);
            this.m_bEquip.Visible = false;
            this.m_bEquip.RemoveValueChangedDelegate(new EZValueChangedDelegate(this.OnClickEquipItem));
        }
        base.InteractivePanel.twinFormID = G_ID.ITEMTOOLTIP_SECOND_DLG;
    }
 public void Set_Tooltip(ITEM pkItem)
 {
     this.m_cItem = pkItem;
     this.Item_Tooltip(this, this.m_cItem, null, G_ID.NONE, false);
     this.Show();
     ItemTooltipDlg_Second.Tooltip_Rect(this, Vector3.zero);
 }
 public void Set_Tooltip(G_ID a_eWidowID, ITEM a_cItem, bool bEquiped = false)
 {
     this.m_eParentWindowID = a_eWidowID;
     this.m_cItem           = a_cItem;
     this.Item_Tooltip(this, this.m_cItem, null, this.m_eParentWindowID, bEquiped);
     this.Show();
     ItemTooltipDlg_Second.Tooltip_Rect(this, Vector3.zero);
 }
 public void Set_Tooltip(G_ID eWidowID, ITEM pkItem, ITEM pkEquipedItem)
 {
     this.m_eParentWindowID = eWidowID;
     this.m_cItem           = pkItem;
     this.Item_Tooltip(this, this.m_cItem, pkEquipedItem, eWidowID, false);
     this.Show();
     ItemTooltipDlg_Second.Tooltip_Rect(this, Vector3.zero);
 }
 public void Set_Tooltip(G_ID eWidowID, int itemunique)
 {
     this.m_eParentWindowID = eWidowID;
     this.m_cItem.Init();
     this.m_cItem.m_nItemUnique = itemunique;
     this.Item_Tooltip(this, this.m_cItem, null, eWidowID, false);
     this.Show();
     ItemTooltipDlg_Second.Tooltip_Rect(this, Vector3.zero);
 }
 public void Set_Tooltip(G_ID a_eWidowID, ITEM a_cItem, bool bEquiped, Vector3 showPosition, long SolID = 0L)
 {
     this.m_eParentWindowID = a_eWidowID;
     this.m_cItem           = a_cItem;
     this.m_SolID           = SolID;
     this.Item_Tooltip(this, this.m_cItem, null, this.m_eParentWindowID, bEquiped);
     this.Show();
     ItemTooltipDlg_Second.Tooltip_Rect(this, showPosition);
 }
Ejemplo n.º 7
0
    public void OnClickEquipItem(IUIObject obj)
    {
        if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.SOLEQUIPITEMSELECT_DLG))
        {
            SolEquipItemSelectDlg solEquipItemSelectDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLEQUIPITEMSELECT_DLG) as SolEquipItemSelectDlg;

            ITEM iTEM = solEquipItemSelectDlg.MobileSelbutton.data as ITEM;
            if (iTEM == null)
            {
                return;
            }
            long solid = 0L;
            SolMilitaryGroupDlg solMilitaryGroupDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLMILITARYGROUP_DLG) as SolMilitaryGroupDlg;

            if (solMilitaryGroupDlg != null && solMilitaryGroupDlg.Visible)
            {
                NkSoldierInfo selectedSolinfo = solMilitaryGroupDlg.GetSelectedSolinfo();
                solid = selectedSolinfo.GetSolID();
            }
            Protocol_Item.Item_Use(iTEM, solid);
            solEquipItemSelectDlg.CloseForm(null);
        }
        if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.SOLSELECT_DLG))
        {
            ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg;

            ItemTooltipDlg_Second itemTooltipDlg_Second = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMTOOLTIP_SECOND_DLG) as ItemTooltipDlg_Second;

            if (itemTooltipDlg != null && itemTooltipDlg_Second != null)
            {
                Protocol_Item.Item_Use(itemTooltipDlg.Item, itemTooltipDlg.SolID);
                SoldierSelectDlg soldierSelectDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLSELECT_DLG) as SoldierSelectDlg;

                if (soldierSelectDlg != null)
                {
                    NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.SOLSELECT_DLG);
                }
            }
        }
        this.Close();
    }
Ejemplo n.º 8
0
    public override void Update()
    {
        base.Update();
        if ((NkInputManager.GetMouseButtonDown(0) || NkInputManager.GetMouseButtonDown(1)) && NrTSingleton <FormsManager> .Instance.FocusFormID() == this.m_ParentWinID && TsPlatform.IsMobile)
        {
            Form form = NrTSingleton <FormsManager> .Instance.GetForm((G_ID)this.m_ParentWinID);

            if (form != null)
            {
                if (form is ItemTooltipDlg)
                {
                    ItemTooltipDlg itemTooltipDlg = form as ItemTooltipDlg;
                    if (itemTooltipDlg != null)
                    {
                        itemTooltipDlg.CloseSetItemTooltip();
                    }
                }
                if (form is ItemTooltipDlg_Second)
                {
                    ItemTooltipDlg_Second itemTooltipDlg_Second = form as ItemTooltipDlg_Second;
                    if (itemTooltipDlg_Second != null)
                    {
                        itemTooltipDlg_Second.CloseSetItemTooltip();
                    }
                }
                if (form is Item_Box_Select_Dlg)
                {
                    Item_Box_Select_Dlg item_Box_Select_Dlg = form as Item_Box_Select_Dlg;
                    if (item_Box_Select_Dlg != null)
                    {
                        item_Box_Select_Dlg.CloseSetItemTooltip();
                    }
                }
            }
        }
    }