Esempio n. 1
0
            public bool AddButton(VRCEUiQuickButton button)
            {
                if (!CanAddItems)
                {
                    return(false);
                }
                RectTransform position = button.Position;

                if (position == null)
                {
                    return(false);
                }

                button.Control.SetParent(_parent.ContentControl, false);
                button.Control.gameObject.SetActive(IsActive);
                position.anchorMin     = new Vector2(0f, 0f);
                position.anchorMax     = new Vector2(0f, 0f);
                position.pivot         = new Vector2(0f, 1f);
                position.localPosition = new Vector3(_column * position.sizeDelta.x, -(_row * (position.sizeDelta.y - 15f)), 0f);

                if (_column >= 2)
                {
                    _column = 0;
                    _row++;
                }
                else
                {
                    _column++;
                }
                _items.Add(button);
                return(true);
            }
Esempio n. 2
0
        public bool AddButton(VRCEUiQuickButton button)
        {
            VRCEUiScrollPage page = Pages[Pages.Count - 1];

            if (!page.CanAddItems)
            {
                page = new VRCEUiScrollPage(this);

                DownButtonObject.interactable = true;
                Pages.Add(page);
            }

            return(page.AddButton(button));
        }
Esempio n. 3
0
 public bool HasButton(VRCEUiQuickButton item) =>
 _items.Contains(item);
Esempio n. 4
0
 public bool HasButton(VRCEUiQuickButton button) =>
 Pages.Any(a => a.HasButton(button));