Beispiel #1
0
        private PopupScrollSet getInnerScrollSet()
        {
            GameObject     obj      = Instantiate(scrollSet) as GameObject;
            PopupScrollSet specific = obj.GetComponent <PopupScrollSet>();

            specific.ui = ui;
            specific.next.onClick.AddListener(delegate { specific.bNext(); });
            specific.prev.onClick.AddListener(delegate { specific.bPrev(); });
            specific.cancel.onClick.AddListener(delegate { specific.bCancel(); });
            specific.select.onClick.AddListener(delegate { specific.bSelect(); });
            return(specific);
        }
Beispiel #2
0
        public PopupScrollSet getScrollSet(VoteSession sess, List <VoteOption> votes)
        {
            PopupScrollSet specific = getInnerScrollSet();

            foreach (VoteOption b in votes)
            {
                PopupBoxVote box = getVoteBox(sess, b);
                box.gameObject.transform.SetParent(specific.gameObject.transform);
                specific.scrollables.Add(box);
            }

            return(specific);
        }
Beispiel #3
0
        public PopupScrollSet getScrollSet(List <int> indices)
        {
            PopupScrollSet specific = getInnerScrollSet();

            foreach (int q in indices)
            {
                PopupBoxPerson box = getPersonBox();
                box.gameObject.transform.SetParent(specific.gameObject.transform);
                specific.scrollables.Add(box);
            }

            return(specific);
        }
Beispiel #4
0
        public PopupScrollSet getScrollSet(Ab_Soc_ProposeVote ab, Society soc, List <VoteIssue> issues)
        {
            PopupScrollSet specific = getInnerScrollSet();

            foreach (VoteIssue issue in issues)
            {
                PopupBoxVoteIssue box = getVoteIssueBox(ab, soc, issue);
                box.gameObject.transform.SetParent(specific.gameObject.transform);
                specific.scrollables.Add(box);
            }

            return(specific);
        }
Beispiel #5
0
        public PopupScrollSet getScrollSet(List <Ability> abilities, List <Ability> abilities_uncastable, Hex hex)
        {
            PopupScrollSet specific = getInnerScrollSet();

            foreach (Ability b in abilities)
            {
                PopupBoxAbility box = getAbilityBox(b, hex);
                box.gameObject.transform.SetParent(specific.gameObject.transform);
                specific.scrollables.Add(box);
            }
            foreach (Ability b in abilities_uncastable)
            {
                PopupBoxAbility box = getAbilityBox(b, hex);
                box.gameObject.transform.SetParent(specific.gameObject.transform);
                specific.scrollables.Add(box);
            }

            return(specific);
        }