void SetupEx(string item_id, string res_id, Sprite sprite, string value, UnityAction action_on_delete)
 {
     if (action_on_delete != null)
     {
         DeleteButton.onClick.RemoveAllListeners();
         DeleteButton.onClick.AddListener(action_on_delete);
         IconButton.onClick.RemoveAllListeners();
         IconButton.onClick.AddListener(() => { AddResourcePanel.Open(item_id, res_id); });
     }
     Icon.sprite = sprite;
     Value.text  = value;
 }
Exemplo n.º 2
0
    public void OnDrop(PointerEventData eventData)
    {
        string WorkItemID = Item.ID;
        string ResourceID = itemBeingDragged.ID;

        if (engine.isHaveResourceCycle(WorkItemID, ResourceID))
        {
            Message.Show("ERROR", "Resource graph cycle detected!");
        }
        else
        {
            AddResourcePanel.Open(WorkItemID, ResourceID);
        }
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     panel = this;
     gameObject.SetActive(false);
 }