コード例 #1
0
 public ComplexCarPaint([Localizable(false)] string detailsTexture, int flakesSize, [Localizable(false)] string mapsTexture,
                        [NotNull] PaintShopSource mapsSource, [CanBeNull] PaintShopSource mapsMask, Color?defaultColor = null)
     : base(detailsTexture, flakesSize, defaultColor)
 {
     MapsTexture        = mapsTexture;
     MapsMask           = mapsMask;
     MapsDefaultTexture = mapsSource;
     AffectedTextures.Add(mapsTexture);
 }
コード例 #2
0
 public void SetPatterns(string patternTexture, PaintShopSource patternBase, [CanBeNull] PaintShopSource patternOverlay,
                         IEnumerable <CarPaintPattern> patterns)
 {
     PatternTexture = patternTexture;
     PatternBase    = patternBase;
     PatternOverlay = patternOverlay;
     Patterns.ReplaceEverythingBy(patterns.Prepend(new CarPaintPattern("Nothing", PaintShopSource.Transparent, null, new CarPaintColors())));
     CurrentPattern  = Patterns[0];
     _patternChanged = true;
     AffectedTextures.Add(patternTexture);
 }
コード例 #3
0
 public CarPaint(string detailsTexture, int flakesSize = 256, Color?defaultColor = null) : base(true)
 {
     LiveryPriority = 1;
     FlakesSize     = flakesSize;
     SupportsFlakes = flakesSize > 0;
     DetailsTexture = detailsTexture;
     DefaultColor   = defaultColor ?? Color.FromRgb(255, 255, 255);
     Patterns       = new ChangeableObservableCollection <CarPaintPattern>();
     Patterns.ItemPropertyChanged += OnPatternChanged;
     AffectedTextures.Add(detailsTexture);
 }