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); }
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)); }
public bool HasButton(VRCEUiQuickButton item) => _items.Contains(item);
public bool HasButton(VRCEUiQuickButton button) => Pages.Any(a => a.HasButton(button));