Exemple #1
0
        protected override void ApplyProps(UIComponentProps props)
        {
            if (!(props is UIRadioGroupProps radioGroupSettings))
            {
                throw new ArgumentException("UIRadioGroup: The given settings is not UIRadioGroupSettings");
            }

            _canDeselectCurrent = radioGroupSettings.CanDeselectCurrent;

            base.ApplyProps(props);
        }
Exemple #2
0
        protected override void ApplyProps(UIComponentProps props)
        {
            if (!(props is UIContainerProps containerSettings))
            {
                throw new ArgumentException("UIContainer: The given settings is not UIContainerSettings");
            }

            SizeX = containerSettings.SizeX;
            SizeY = containerSettings.SizeY;

            base.ApplyProps(props);
        }
Exemple #3
0
        internal static T Create <T>(UIObject parent, UIComponentProps props = null)
            where T : UIComponent
        {
            if (parent == null)
            {
                throw new ArgumentNullException(nameof(parent));
            }

            if (props == null)
            {
                throw new Exception("UIComponent: UIComponentProps can not be null");
            }

            var component = new GameObject(typeof(T).Name).AddComponent <T>();

            component.SetupParent(parent);
            component.ApplyProps(props);
            component.InitCompleted(true);
            mUI.ObjectCreated(component);
            return(component);
        }
Exemple #4
0
 protected virtual void ApplyProps(UIComponentProps props)
 {
     base.ApplyProps(props);
 }