Set() static public méthode

Override the cursor with the specified sprite.
static public Set ( UIAtlas, atlas, string sprite ) : void
atlas UIAtlas,
sprite string
Résultat void
Exemple #1
0
 public static void Clear()
 {
     if (UICursor.instance != null && UICursor.instance.mSprite != null)
     {
         UICursor.Set(UICursor.instance.mAtlas, UICursor.instance.mSpriteName);
     }
 }
 // Token: 0x060000E3 RID: 227 RVA: 0x00011B94 File Offset: 0x0000FD94
 private void UpdateCursor()
 {
     if (UIItemSlot.mDraggedItem != null && UIItemSlot.mDraggedItem.baseItem != null)
     {
         UICursor.Set(UIItemSlot.mDraggedItem.baseItem.iconAtlas as INGUIAtlas, UIItemSlot.mDraggedItem.baseItem.iconName);
         return;
     }
     UICursor.Clear();
 }
Exemple #3
0
    /// <summary>
    /// Set the cursor to the icon of the item being dragged.
    /// </summary>

    void UpdateCursor()
    {
        if (mDraggedItem != null && mDraggedItem.baseItem != null)
        {
            UICursor.Set(mDraggedItem.baseItem.iconAtlas, mDraggedItem.baseItem.iconName);
        }
        else
        {
            UICursor.Clear();
        }
    }
 // Token: 0x06000035 RID: 53 RVA: 0x0000925C File Offset: 0x0000765C
 private void UpdateCursor()
 {
     if (UIItemSlot.mDraggedItem != null && UIItemSlot.mDraggedItem.baseItem != null)
     {
         UICursor.Set(UIItemSlot.mDraggedItem.baseItem.iconAtlas, UIItemSlot.mDraggedItem.baseItem.iconName);
     }
     else
     {
         UICursor.Clear();
     }
 }
 protected virtual void DoDisplayCursor(bool state)
 {
     if (state)
     {
         UICursor.Set(this.m_Sprite, this.m_Size, false, this.m_AnimatorState);
     }
     else
     {
         UICursor.Clear();
     }
 }
Exemple #6
0
    public void OnClickTowerInfo(TowerSimpleData data)
    {
        StopCoroutine("SelectCancel");
        StartCoroutine("SelectCancel");
        StopCoroutine("CheckUI");
        StartCoroutine("CheckUI");

        SetSelectedTower(true);
        spSelectedTower.spriteName = data.TowerType.ToString();
        UICursor.Set(atlas, data.TowerType.ToString());
        tfSelectedTower.localScale = Vector3.one * 10 / mainCamera.orthographicSize;
    }
Exemple #7
0
 public void Unstack()
 {
     if (item != null)
     {
         int amount = Mathf.RoundToInt(spinner.current);
         item.Stack -= amount;
         Item newItem = (Item)Instantiate(item);
         newItem.Stack = amount;
         item          = newItem;
         UICursor.Set(item.Icon);
         base.Close();
     }
 }
Exemple #8
0
 private void SetIcon(Texture iconTex, string iconString)
 {
     if (null != iconTex)
     {
         UICursor.Set(mIconAtlas, "Null");
         mIcontex.enabled              = true;
         mIcontex.mainTexture          = iconTex;
         mIcontex.transform.localScale = new Vector3(48, 48, 1);
     }
     else
     {
         UICursor.Set(mIconAtlas, iconString);
         mIcontex.enabled = false;
     }
 }
Exemple #9
0
    void OnDeleteBtn()
    {
        if (m_SplitWnd.gameObject.activeInHierarchy)
        {
            return;
        }

        if (m_OpType == 2)
        {
            m_OpType = 0;
            UICursor.Clear();
        }
        else
        {
            m_OpType = 2;
            UICursor.Set(mNewUIAtlas, "icodelete");
        }

        m_OpGird = null;
    }
Exemple #10
0
    void OnSplitBtn()
    {
        if (m_SplitWnd.activeInHierarchy)
        {
            return;
        }

        if (m_OpType == 1)
        {
            m_OpType = 0;
            UICursor.Clear();
        }
        else
        {
            m_OpType = 1;
            UICursor.Set(mNewUIAtlas, "icocai");
        }

        m_OpGird = null;
    }
Exemple #11
0
    // Update is called once per frame
    void Update()
    {
        // Page Button
        //if (m_PageIndex == 2)
        //    m_PageUpBtn.isEnabled = false;
        //else
        //    m_PageUpBtn.isEnabled = true;

        //if (m_PageIndex == 0)
        //    m_PageDownBtn.isEnabled = false;
        //else
        //    m_PageDownBtn.isEnabled = true;

        if (Input.GetKeyDown(KeyCode.PageUp))
        {
            BtnLeftOnClick();
        }

        if (Input.GetKeyDown(KeyCode.PageDown))
        {
            BtnRightOnClick();
        }

        //lz-2016.10.26 鼠标右键点击取消操作
        if ((PeInput.Get(PeInput.LogicFunction.OpenItemMenu) || Input.GetMouseButtonDown(1)) && !m_SplitWnd.activeSelf && m_OpGird == null)
        {
            m_OpType = 0;
            UICursor.Clear();
        }

        switch (m_OpType)
        {
        case 1:
            UICursor.Set(mNewUIAtlas, "icocai");
            break;

        case 2:
            UICursor.Set(mNewUIAtlas, "icodelete");
            break;
        }
    }
Exemple #12
0
 public static void Clear()
 {
     UICursor.Set(UICursor.mInstance.mAtlas, UICursor.mInstance.mSpriteName);
 }