private BufferedDropdownElement InstantiateBufferedDropdownElement() { var bufferedDropdownElement = new BufferedDropdownElement(Instantiate(UIReferences.standardDropdownItem, contentTransform)); bufferedDropdownElement.rectTransform.sizeDelta = new Vector2(rect.width, rect.height); bufferedDropdownElement.button.onClick.AddListener(Animate); bufferedDropdownElement.button.onClick.AddListener(delegate { ChangeDropdownInfo(bufferedDropdownElements.IndexOf(bufferedDropdownElement)); }); return(bufferedDropdownElement); }
private void BufferDropdownElement(BufferedDropdownElement bufferedDropdownElement, bool state) { //bufferedDropdownElement.gameObject.SetActive(state); bufferedDropdownElement.canvasGroup.alpha = System.Convert.ToInt32(state); bufferedDropdownElement.layoutElement.ignoreLayout = !state; }