add blank template

This commit is contained in:
haven1433
2022-11-24 22:26:25 -06:00
parent af20da7a1d
commit 8a75b2bd4f

View File

@@ -570,6 +570,15 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Map {
images.Add(visOption);
}
// create one additional 'blank' prototype
initialBlockmaps.Add(new int[9, 9]);
var blank = new LayoutPrototype(primaryBlocksetAddress, secondaryBlocksetAddress, borderBlockAddress);
orderedPrototypes.Add(blank);
var blankRender = new CanvasPixelViewModel(9 * 16, 9 * 16) { SpriteScale = images[0].Visual.SpriteScale };
var blankVisOption = new VisualOption { Index = orderedPrototypes.Count - 1, Option = "Blank", ShortDescription = "Use Current Blocksets", Visual = blankRender };
warpIsBottomSquareForIndex.Add(true);
images.Add(blankVisOption);
var choice = fileSystem.ShowOptions("Create New Map", "Start from which template?", null, images.ToArray());
if (choice == -1) return null;
var chosenPrototype = orderedPrototypes[choice];