Esempio n. 1
0
 public HatSettings WithOverride(HatSettings over)
 => new HatSettings
 {
     HorizontalSize = over?.HorizontalSize ?? HorizontalSize,
     HatPosition    = over?.HatPosition ?? HatPosition,
     ImageName      = over?.ImageName ?? ImageName
 };
Esempio n. 2
0
 private static Hat ReadFromHatfile(string path, HatSettings overrides, TomlSettings tomlSettings)
 {
     try
     {
         using (var zf = HatfileReader.Create(path))
         {
             var entry = zf.GetEntry(HatfileMeta);
             if (entry == null)
             {
                 MessageBox.Show($"Custom hat at '{path}' is invalid. It does not have '{HatfileMeta}'.",
                                 Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
                 return(default);
Esempio n. 3
0
 public Hat(Bitmap bm, HatSettings settings)
 {
     Image    = bm;
     Settings = settings;
 }