private void LoadMap(string MapPath) { string Name = MapPath.Substring(0, MapPath.Length - 4).Substring(28); this.Text = Name + " - Project Eternity Adventure Map Editor"; LayerViewer.Preload(); AdventureMap LoadedFightingZone = new AdventureMap(Name); LayerViewer.ActiveFightingZone = LoadedFightingZone; LayerViewer.ActiveFightingZone.Content = LayerViewer.content; LayerViewer.ActiveFightingZone.Load(); }
private void LoadMap(string MapPath) { string Name = MapPath.Substring(0, MapPath.Length - 4).Substring(28); this.Text = Name + " - Project Eternity Triple Thunder Map Editor"; LayerViewer.Preload(); FightingZone LoadedFightingZone = new FightingZone(Name, false); LoadedFightingZone.UsePreview = true; LayerViewer.ActiveFightingZone = LoadedFightingZone; LayerViewer.ActiveFightingZone.Content = LayerViewer.content; LayerViewer.ActiveFightingZone.Load(); LayerViewer.SetListMapScript(LoadedFightingZone.ListMapScript); LayerViewer.Helper.OnSelect = (SelectedObject, RightClick) => { if (RightClick && SelectedObject != null) { LayerViewer.cmsScriptMenu.Show(LayerViewer, PointToClient(Cursor.Position)); } else { pgScriptProperties.SelectedObject = SelectedObject; } }; for (int S = LoadedFightingZone.ListMapScript.Count - 1; S >= 0; --S) { LayerViewer.Helper.InitScript(LoadedFightingZone.ListMapScript[S]); } for (int L = 0; L < LayerViewer.ActiveFightingZone.ListLayer.Count; L++) { lstLayers.Items.Add("Layer " + lstLayers.Items.Count); } if (LayerViewer.ActiveFightingZone.ListLayer.Count > 0) { lstLayers.SelectedIndex = 0; } }