Exemple #1
0
 public void addSgnature(Signature s)
 {
     if (siganatures == null)
     {
         siganatures = new ListSignaute();
     }
     siganatures.add(s);
 }
Exemple #2
0
    public void ListSignatures(ListSignaute Signatures)
    {
        int c = 0;

        if (clicked == false)
        {
            Debug.Log("Comenzando...");

            for (int i = 0; i < Signatures.GetEnumerato(); i++)
            {
                var btn = Instantiate(button);

                btn.SetActive(true);
                ButtonClass btnblocks = btn.GetComponent <ButtonClass>();
                btnblocks.SetName(Signatures.getInd(i).title + Signatures.getInd(i).hourBegin);
                btnblocks.setBlock(Signatures.getInd(i).block);

                int x = 0;
                int y = c;
                int z = 0;
                c = c + 150;


                btn.transform.SetParent(scrollBox.transform, false);
                btn.transform.parent = scrollBox.transform;
                RectTransform rt = btn.GetComponent <RectTransform>();
                rt.anchoredPosition = rt.transform.position;
                rt.localPosition    = new Vector2(0, -y);
                // btn.transform.SetPositionAndRotation(pos,scrollBox.transform.localRotation);
            }
        }
        else
        {
            actualzar();
        }
        clicked = !clicked;
    }