Use the map save dialog to set new map properties.

This commit is contained in:
Paul Chote
2015-06-20 19:30:59 +01:00
parent cd1fdb9b36
commit b2050ae1aa
3 changed files with 32 additions and 24 deletions

View File

@@ -102,11 +102,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic
saveMapButton.OnClick = () =>
{
hideMenu = true;
var editorActorLayer = world.WorldActor.Trait<EditorActorLayer>();
Ui.OpenWindow("SAVE_MAP_PANEL", new WidgetArgs()
{
{ "onSave", (Action<string>)(_ => hideMenu = false) },
{ "onExit", () => hideMenu = false },
{ "map", world.Map },
{ "editorActorLayer", world.WorldActor.Trait<EditorActorLayer>() }
{ "playerDefinitions", editorActorLayer.Players.ToMiniYaml() },
{ "actorDefinitions", editorActorLayer.Save() }
});
};