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();
        }
Ejemplo n.º 2
0
        private void lstScriptChoices_DoubleClick(object sender, EventArgs e)
        {
            if (!(sender is ListBox))
            {
                return;
            }
            if (((ListBox)sender).SelectedIndex == -1)
            {
                return;
            }

            LayerViewer.CreateScript((MapScript)((ListBox)sender).SelectedItem);
        }
Ejemplo n.º 3
0
        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;
            }
        }