Write maps to zip file from editor

This commit is contained in:
Matthew Bowra-Dean
2010-12-28 22:00:39 +13:00
committed by Matthew
parent 44e668e804
commit 13f6a13ad9
4 changed files with 50 additions and 19 deletions

View File

@@ -267,17 +267,17 @@ namespace OpenRA.Editor
if (nms.txtNew.Text == "")
nms.txtNew.Text = "unnamed";
string mapfoldername = Path.Combine(nms.MapFolderPath, nms.txtNew.Text);
loadedMapName = mapfoldername;
string mapZipName = Path.Combine(nms.MapFolderPath, nms.txtNew.Text + ".oramap");
loadedMapName = mapZipName;
try
{
Directory.CreateDirectory(mapfoldername);
}
catch (Exception ed)
{
MessageBox.Show("Directory creation failed: {0}", ed.ToString());
}
// try
// {
// Directory.CreateDirectory(mapZipName);
// }
// catch (Exception ed)
// {
// MessageBox.Show("Directory creation failed: {0}", ed.ToString());
// }
SaveClicked(sender, e);
}