コード例 #1
0
ファイル: Provider.cs プロジェクト: Banbury/duality
        public PropertyEditor CreateEditor(Type baseType, ProviderContext context)
        {
            PropertyEditor e = null;

            if (baseType == typeof(Vector2))
            {
                e = new Vector2PropertyEditor();
            }
            else if (baseType == typeof(Vector3))
            {
                e = new Vector3PropertyEditor();
            }
            else if (baseType == typeof(Vector4))
            {
                e = new Vector4PropertyEditor();
            }
            else if (baseType == typeof(Rect))
            {
                e = new RectPropertyEditor();
            }

            else if (typeof(IColorData).IsAssignableFrom(baseType))
            {
                e = new IColorDataPropertyEditor();
            }

            return(e);
        }
コード例 #2
0
		public PropertyEditor CreateEditor(Type baseType, ProviderContext context)
		{
			PropertyEditor e = null;

			if (baseType == typeof(Vector2))		e = new Vector2PropertyEditor();
			else if (baseType == typeof(Vector3))	e = new Vector3PropertyEditor();
			else if (baseType == typeof(Vector4))	e = new Vector4PropertyEditor();
			else if (baseType == typeof(Rect))		e = new RectPropertyEditor();

			else if (typeof(IColorData).IsAssignableFrom(baseType))		e = new IColorDataPropertyEditor();

			return e;
		}