コード例 #1
0
        public void Binding(object control, object model, LegoRectTransformMeta rectMeta)
        {
            var dropdown = control as YuLegoDropdown;
            var rxModel  = model as YuLegoDropdownRxModel;

            rxModel.LocControl = dropdown;

            // 设置可交互状态
            dropdown.Interactable = rxModel.LastInteractableValue;

            rxModel.SelectIndex.BindingControl(dropdown, dropdown.ReceiveValueChange);
            dropdown.BindingPush(rxModel.SelectIndex.ReceiveControlChange);

            dropdown.GameObject.SetActive(rectMeta.IsDefaultActive);
        }