예제 #1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int type = parameter is string?int.Parse((string)parameter, CultureInfo.InvariantCulture) : 0;

            switch (type)
            {
            case 0:
                return(TextureHelpers.BuildOptTexture(value as Texture));

            case 1:
                return(TextureHelpers.BuildOptTextureAlpha(value as Texture));
            }

            return(null);
        }