private PaintShopOverrideBase GetOverride(PaintShopDestination name) { var replacement = Replacements.GetValueOrDefault(name); return(new PaintShopOverrideTint { Colors = Colors.DrawingColors, Alpha = ValueAdjustment.Same, Source = replacement?.Source, Mask = replacement?.Mask, Overlay = replacement?.Overlay }); }
public CarPaint SetDetailsParams(PaintShopDestination detailsTexture, bool supportFlakes = true, int flakesSize = 512, bool colorAvailable = true, Color?defaultColor = null, Dictionary <string, CarPaintReplacementSource> replacements = null) { FlakesSize = flakesSize; SupportsFlakes = supportFlakes && flakesSize > 0; ColorAvailable = colorAvailable; DetailsTexture = detailsTexture; DefaultColor = defaultColor ?? Color.FromRgb(255, 255, 255); ColorReplacements = replacements?.If(colorAvailable, x => x.Prepend(new KeyValuePair <string, CarPaintReplacementSource>("Solid color", null))) .ToDictionary(x => x.Key, x => x.Value); if (ColorReplacements != null) { ColorReplacementValue = ColorReplacements.FirstOrDefault(); } else { UpdateFlakesAllowed(); UpdateColorAllowed(); } return(this); }
public ColoredItem([NotNull, Localizable(false)] PaintShopDestination diffuseTexture, [NotNull] CarPaintColors colors) : this(new Dictionary <PaintShopDestination, PaintShop.TintedEntry> { [diffuseTexture] = new PaintShop.TintedEntry(PaintShopSource.White, null, null) }, colors) { }
public ColoredItem([NotNull, Localizable(false)] PaintShopDestination diffuseTexture, Color defaultColor) : this(diffuseTexture, new CarPaintColors(defaultColor)) { }
public TintedWindows([Localizable(false)] PaintShopDestination diffuseTexture, CarPaintColors colors, double defaultAlpha = 0.23, bool fixedColor = false) : base(diffuseTexture, colors) { DefaultAlpha = defaultAlpha; FixedColor = fixedColor; }
public TintedWindows([Localizable(false)] PaintShopDestination diffuseTexture, Color?defaultColor = null, double defaultAlpha = 0.23, bool fixedColor = false) : base(diffuseTexture, defaultColor ?? Color.FromRgb(41, 52, 55)) { DefaultAlpha = defaultAlpha; FixedColor = fixedColor; }
private PaintShopOverrideBase GetOverride(PaintShopDestination name) { return(new PaintShopOverrideWithColor { Color = _color.ToColor((_opacity * 255).ClampToByte()) }); }
private PaintShopOverrideBase GetOverride(PaintShopDestination name) { return(new PaintShopOverrideWithTexture { Source = _replacements.GetValueOrDefault(name) }); }
public ComplexCarPaint([Localizable(false)] PaintShopDestination mapsTexture, [NotNull] PaintShopSource mapsSource, [CanBeNull] PaintShopSource mapsMask) { MapsTexture = mapsTexture; MapsMask = mapsMask; MapsDefaultTexture = mapsSource; }