Exemplo n.º 1
0
        private CatagoryElement ConstructCatagoryElement(CatagoryModel model, decimal total, int index)
        {
            CatagoryElement newExpense = GameObject.Instantiate(original: CatagoryElements[index - 1], parent: CatagoryElements[index - 1].transform.parent.transform) as CatagoryElement;
            RectTransform   newRect    = newExpense.GetComponent <RectTransform>();

            newRect.anchoredPosition = new Vector3(newRect.anchoredPosition.x, newRect.anchoredPosition.y - CatagoryOffset);
            //newExpense.SetTileRect(TileRect); Add Later if I want the catagory tiles to scroll.
            newExpense.UpdateView(model, total);
            return(newExpense);
        }
Exemplo n.º 2
0
        public void Awake(CatagoryElement original, RectTransform tileRect, TextMeshProUGUI headerText, TextMeshProUGUI spentText, bool recurring)
        {
            CatagoryElements[0] = original;
            IsRecurring         = recurring;
            TileRect            = tileRect;
            StartingTileHeight  = TileRect.sizeDelta.y;

            Header = headerText;
            Spent  = spentText;
        }
Exemplo n.º 3
0
 private void ResetOriginalElement(CatagoryElement original, int arrayLength)
 {
     CatagoryElements    = new CatagoryElement[arrayLength];
     CatagoryElements[0] = original;
 }