public HatSettings WithOverride(HatSettings over) => new HatSettings { HorizontalSize = over?.HorizontalSize ?? HorizontalSize, HatPosition = over?.HatPosition ?? HatPosition, ImageName = over?.ImageName ?? ImageName };
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);
public Hat(Bitmap bm, HatSettings settings) { Image = bm; Settings = settings; }