Streamlined opening files in project window, Added open folder option

This commit is contained in:
dexy 2022-01-09 20:59:10 +11:00
parent 19565e7d74
commit edabc852a9
5 changed files with 273 additions and 735 deletions

View File

@ -43,17 +43,9 @@
this.FileNewTrainsMenu = new System.Windows.Forms.ToolStripMenuItem(); this.FileNewTrainsMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileNewScenarioMenu = new System.Windows.Forms.ToolStripMenuItem(); this.FileNewScenarioMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileNewAudioDatMenu = new System.Windows.Forms.ToolStripMenuItem(); this.FileNewAudioDatMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); this.FileOpenProjectMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); this.FileOpenFilesMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenYmapMenu = new System.Windows.Forms.ToolStripMenuItem(); this.FileOpenFolderMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenYtypMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenYbnMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenYndMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenYnvMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenTrainsMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenScenarioMenu = new System.Windows.Forms.ToolStripMenuItem();
this.FileOpenAudioDatMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.FileCloseProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); this.FileCloseProjectMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
@ -90,6 +82,7 @@
this.YtypNameMenu = new System.Windows.Forms.ToolStripMenuItem(); this.YtypNameMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.YtypNewArchetypeMenu = new System.Windows.Forms.ToolStripMenuItem(); this.YtypNewArchetypeMenu = new System.Windows.Forms.ToolStripMenuItem();
this.YtypNewArchetypeFromYdrMenu = new System.Windows.Forms.ToolStripMenuItem();
this.YtypMloToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.YtypMloToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.YtypMloNewEntityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.YtypMloNewEntityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.YtypMloNewRoomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.YtypMloNewRoomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -196,18 +189,12 @@
this.ToolbarNewScenarioMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarNewScenarioMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenButton = new CodeWalker.WinForms.ToolStripSplitButtonFix(); this.ToolbarOpenButton = new CodeWalker.WinForms.ToolStripSplitButtonFix();
this.ToolbarOpenProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarOpenProjectMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.ToolbarOpenFilesMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenYmapMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarOpenFolderMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenYtypMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenYbnMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenYndMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenYnvMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenTrainsMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenScenarioMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSaveButton = new System.Windows.Forms.ToolStripButton(); this.ToolbarSaveButton = new System.Windows.Forms.ToolStripButton();
this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton(); this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.YtypNewArchetypeFromYdrMenu = new System.Windows.Forms.ToolStripMenuItem(); this.FolderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
this.MainMenu.SuspendLayout(); this.MainMenu.SuspendLayout();
this.MainToolbar.SuspendLayout(); this.MainToolbar.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@ -238,7 +225,9 @@
// //
this.FileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.FileNewMenu, this.FileNewMenu,
this.FileOpenMenu, this.FileOpenProjectMenu,
this.FileOpenFilesMenu,
this.FileOpenFolderMenu,
this.toolStripSeparator3, this.toolStripSeparator3,
this.FileCloseProjectMenu, this.FileCloseProjectMenu,
this.toolStripSeparator4, this.toolStripSeparator4,
@ -264,7 +253,7 @@
this.FileNewScenarioMenu, this.FileNewScenarioMenu,
this.FileNewAudioDatMenu}); this.FileNewAudioDatMenu});
this.FileNewMenu.Name = "FileNewMenu"; this.FileNewMenu.Name = "FileNewMenu";
this.FileNewMenu.Size = new System.Drawing.Size(163, 22); this.FileNewMenu.Size = new System.Drawing.Size(180, 22);
this.FileNewMenu.Text = "New"; this.FileNewMenu.Text = "New";
// //
// FileNewProjectMenu // FileNewProjectMenu
@ -335,114 +324,50 @@
this.FileNewAudioDatMenu.Text = "Audio Dat File"; this.FileNewAudioDatMenu.Text = "Audio Dat File";
this.FileNewAudioDatMenu.Click += new System.EventHandler(this.FileNewAudioDatMenu_Click); this.FileNewAudioDatMenu.Click += new System.EventHandler(this.FileNewAudioDatMenu_Click);
// //
// FileOpenMenu
//
this.FileOpenMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.FileOpenProjectMenu,
this.toolStripSeparator9,
this.FileOpenYmapMenu,
this.FileOpenYtypMenu,
this.FileOpenYbnMenu,
this.FileOpenYndMenu,
this.FileOpenYnvMenu,
this.FileOpenTrainsMenu,
this.FileOpenScenarioMenu,
this.FileOpenAudioDatMenu});
this.FileOpenMenu.Name = "FileOpenMenu";
this.FileOpenMenu.Size = new System.Drawing.Size(163, 22);
this.FileOpenMenu.Text = "Open";
//
// FileOpenProjectMenu // FileOpenProjectMenu
// //
this.FileOpenProjectMenu.Name = "FileOpenProjectMenu"; this.FileOpenProjectMenu.Name = "FileOpenProjectMenu";
this.FileOpenProjectMenu.Size = new System.Drawing.Size(157, 22); this.FileOpenProjectMenu.Size = new System.Drawing.Size(180, 22);
this.FileOpenProjectMenu.Text = "Project..."; this.FileOpenProjectMenu.Text = "Open Project...";
this.FileOpenProjectMenu.Click += new System.EventHandler(this.FileOpenProjectMenu_Click); this.FileOpenProjectMenu.Click += new System.EventHandler(this.FileOpenProjectMenu_Click);
// //
// toolStripSeparator9 // FileOpenFilesMenu
// //
this.toolStripSeparator9.Name = "toolStripSeparator9"; this.FileOpenFilesMenu.Name = "FileOpenFilesMenu";
this.toolStripSeparator9.Size = new System.Drawing.Size(154, 6); this.FileOpenFilesMenu.Size = new System.Drawing.Size(180, 22);
this.FileOpenFilesMenu.Text = "Open Files...";
this.FileOpenFilesMenu.Click += new System.EventHandler(this.FileOpenFilesMenu_Click);
// //
// FileOpenYmapMenu // FileOpenFolderMenu
// //
this.FileOpenYmapMenu.Name = "FileOpenYmapMenu"; this.FileOpenFolderMenu.Name = "FileOpenFolderMenu";
this.FileOpenYmapMenu.Size = new System.Drawing.Size(157, 22); this.FileOpenFolderMenu.Size = new System.Drawing.Size(180, 22);
this.FileOpenYmapMenu.Text = "Ymap File..."; this.FileOpenFolderMenu.Text = "Open Folder...";
this.FileOpenYmapMenu.Click += new System.EventHandler(this.FileOpenYmapMenu_Click); this.FileOpenFolderMenu.Click += new System.EventHandler(this.FileOpenFolderMenu_Click);
//
// FileOpenYtypMenu
//
this.FileOpenYtypMenu.Name = "FileOpenYtypMenu";
this.FileOpenYtypMenu.Size = new System.Drawing.Size(157, 22);
this.FileOpenYtypMenu.Text = "Ytyp File...";
this.FileOpenYtypMenu.Click += new System.EventHandler(this.FileOpenYtypMenu_Click);
//
// FileOpenYbnMenu
//
this.FileOpenYbnMenu.Name = "FileOpenYbnMenu";
this.FileOpenYbnMenu.Size = new System.Drawing.Size(157, 22);
this.FileOpenYbnMenu.Text = "Ybn File...";
this.FileOpenYbnMenu.Click += new System.EventHandler(this.FileOpenYbnMenu_Click);
//
// FileOpenYndMenu
//
this.FileOpenYndMenu.Name = "FileOpenYndMenu";
this.FileOpenYndMenu.Size = new System.Drawing.Size(157, 22);
this.FileOpenYndMenu.Text = "Ynd File...";
this.FileOpenYndMenu.Click += new System.EventHandler(this.FileOpenYndMenu_Click);
//
// FileOpenYnvMenu
//
this.FileOpenYnvMenu.Name = "FileOpenYnvMenu";
this.FileOpenYnvMenu.Size = new System.Drawing.Size(157, 22);
this.FileOpenYnvMenu.Text = "Ynv File...";
this.FileOpenYnvMenu.Click += new System.EventHandler(this.FileOpenYnvMenu_Click);
//
// FileOpenTrainsMenu
//
this.FileOpenTrainsMenu.Name = "FileOpenTrainsMenu";
this.FileOpenTrainsMenu.Size = new System.Drawing.Size(157, 22);
this.FileOpenTrainsMenu.Text = "Trains File...";
this.FileOpenTrainsMenu.Click += new System.EventHandler(this.FileOpenTrainsMenu_Click);
//
// FileOpenScenarioMenu
//
this.FileOpenScenarioMenu.Name = "FileOpenScenarioMenu";
this.FileOpenScenarioMenu.Size = new System.Drawing.Size(157, 22);
this.FileOpenScenarioMenu.Text = "Scenario File...";
this.FileOpenScenarioMenu.Click += new System.EventHandler(this.FileOpenScenarioMenu_Click);
//
// FileOpenAudioDatMenu
//
this.FileOpenAudioDatMenu.Name = "FileOpenAudioDatMenu";
this.FileOpenAudioDatMenu.Size = new System.Drawing.Size(157, 22);
this.FileOpenAudioDatMenu.Text = "Audio Dat File...";
this.FileOpenAudioDatMenu.Click += new System.EventHandler(this.FileOpenAudioDatMenu_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(160, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6);
// //
// FileCloseProjectMenu // FileCloseProjectMenu
// //
this.FileCloseProjectMenu.Enabled = false; this.FileCloseProjectMenu.Enabled = false;
this.FileCloseProjectMenu.Name = "FileCloseProjectMenu"; this.FileCloseProjectMenu.Name = "FileCloseProjectMenu";
this.FileCloseProjectMenu.Size = new System.Drawing.Size(163, 22); this.FileCloseProjectMenu.Size = new System.Drawing.Size(180, 22);
this.FileCloseProjectMenu.Text = "Close Project"; this.FileCloseProjectMenu.Text = "Close Project";
this.FileCloseProjectMenu.Click += new System.EventHandler(this.FileCloseProjectMenu_Click); this.FileCloseProjectMenu.Click += new System.EventHandler(this.FileCloseProjectMenu_Click);
// //
// toolStripSeparator4 // toolStripSeparator4
// //
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(160, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(177, 6);
// //
// FileSaveProjectMenu // FileSaveProjectMenu
// //
this.FileSaveProjectMenu.Enabled = false; this.FileSaveProjectMenu.Enabled = false;
this.FileSaveProjectMenu.Name = "FileSaveProjectMenu"; this.FileSaveProjectMenu.Name = "FileSaveProjectMenu";
this.FileSaveProjectMenu.Size = new System.Drawing.Size(163, 22); this.FileSaveProjectMenu.Size = new System.Drawing.Size(180, 22);
this.FileSaveProjectMenu.Text = "Save Project"; this.FileSaveProjectMenu.Text = "Save Project";
this.FileSaveProjectMenu.Click += new System.EventHandler(this.FileSaveProjectMenu_Click); this.FileSaveProjectMenu.Click += new System.EventHandler(this.FileSaveProjectMenu_Click);
// //
@ -450,7 +375,7 @@
// //
this.FileSaveProjectAsMenu.Enabled = false; this.FileSaveProjectAsMenu.Enabled = false;
this.FileSaveProjectAsMenu.Name = "FileSaveProjectAsMenu"; this.FileSaveProjectAsMenu.Name = "FileSaveProjectAsMenu";
this.FileSaveProjectAsMenu.Size = new System.Drawing.Size(163, 22); this.FileSaveProjectAsMenu.Size = new System.Drawing.Size(180, 22);
this.FileSaveProjectAsMenu.Text = "Save Project As..."; this.FileSaveProjectAsMenu.Text = "Save Project As...";
this.FileSaveProjectAsMenu.Click += new System.EventHandler(this.FileSaveProjectAsMenu_Click); this.FileSaveProjectAsMenu.Click += new System.EventHandler(this.FileSaveProjectAsMenu_Click);
// //
@ -458,7 +383,7 @@
// //
this.FileSaveItemMenu.Enabled = false; this.FileSaveItemMenu.Enabled = false;
this.FileSaveItemMenu.Name = "FileSaveItemMenu"; this.FileSaveItemMenu.Name = "FileSaveItemMenu";
this.FileSaveItemMenu.Size = new System.Drawing.Size(163, 22); this.FileSaveItemMenu.Size = new System.Drawing.Size(180, 22);
this.FileSaveItemMenu.Text = "Save Item"; this.FileSaveItemMenu.Text = "Save Item";
this.FileSaveItemMenu.Visible = false; this.FileSaveItemMenu.Visible = false;
this.FileSaveItemMenu.Click += new System.EventHandler(this.FileSaveItemMenu_Click); this.FileSaveItemMenu.Click += new System.EventHandler(this.FileSaveItemMenu_Click);
@ -467,7 +392,7 @@
// //
this.FileSaveItemAsMenu.Enabled = false; this.FileSaveItemAsMenu.Enabled = false;
this.FileSaveItemAsMenu.Name = "FileSaveItemAsMenu"; this.FileSaveItemAsMenu.Name = "FileSaveItemAsMenu";
this.FileSaveItemAsMenu.Size = new System.Drawing.Size(163, 22); this.FileSaveItemAsMenu.Size = new System.Drawing.Size(180, 22);
this.FileSaveItemAsMenu.Text = "Save Item As..."; this.FileSaveItemAsMenu.Text = "Save Item As...";
this.FileSaveItemAsMenu.Visible = false; this.FileSaveItemAsMenu.Visible = false;
this.FileSaveItemAsMenu.Click += new System.EventHandler(this.FileSaveItemAsMenu_Click); this.FileSaveItemAsMenu.Click += new System.EventHandler(this.FileSaveItemAsMenu_Click);
@ -711,6 +636,14 @@
this.YtypNewArchetypeMenu.Text = "New Archetype"; this.YtypNewArchetypeMenu.Text = "New Archetype";
this.YtypNewArchetypeMenu.Click += new System.EventHandler(this.YtypNewArchetypeMenu_Click); this.YtypNewArchetypeMenu.Click += new System.EventHandler(this.YtypNewArchetypeMenu_Click);
// //
// YtypNewArchetypeFromYdrMenu
//
this.YtypNewArchetypeFromYdrMenu.Enabled = false;
this.YtypNewArchetypeFromYdrMenu.Name = "YtypNewArchetypeFromYdrMenu";
this.YtypNewArchetypeFromYdrMenu.Size = new System.Drawing.Size(218, 22);
this.YtypNewArchetypeFromYdrMenu.Text = "New Archetype from YDR...";
this.YtypNewArchetypeFromYdrMenu.Click += new System.EventHandler(this.YtypNewArchetypeFromYdrMenu_Click);
//
// YtypMloToolStripMenuItem // YtypMloToolStripMenuItem
// //
this.YtypMloToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.YtypMloToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1549,14 +1482,8 @@
this.ToolbarOpenButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.ToolbarOpenButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.ToolbarOpenButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ToolbarOpenButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolbarOpenProjectMenu, this.ToolbarOpenProjectMenu,
this.toolStripSeparator6, this.ToolbarOpenFilesMenu,
this.ToolbarOpenYmapMenu, this.ToolbarOpenFolderMenu});
this.ToolbarOpenYtypMenu,
this.ToolbarOpenYbnMenu,
this.ToolbarOpenYndMenu,
this.ToolbarOpenYnvMenu,
this.ToolbarOpenTrainsMenu,
this.ToolbarOpenScenarioMenu});
this.ToolbarOpenButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarOpenButton.Image"))); this.ToolbarOpenButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarOpenButton.Image")));
this.ToolbarOpenButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.ToolbarOpenButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.ToolbarOpenButton.Name = "ToolbarOpenButton"; this.ToolbarOpenButton.Name = "ToolbarOpenButton";
@ -1567,63 +1494,23 @@
// ToolbarOpenProjectMenu // ToolbarOpenProjectMenu
// //
this.ToolbarOpenProjectMenu.Name = "ToolbarOpenProjectMenu"; this.ToolbarOpenProjectMenu.Name = "ToolbarOpenProjectMenu";
this.ToolbarOpenProjectMenu.Size = new System.Drawing.Size(181, 22); this.ToolbarOpenProjectMenu.Size = new System.Drawing.Size(152, 22);
this.ToolbarOpenProjectMenu.Text = "Open Project..."; this.ToolbarOpenProjectMenu.Text = "Open Project...";
this.ToolbarOpenProjectMenu.Click += new System.EventHandler(this.ToolbarOpenProjectMenu_Click); this.ToolbarOpenProjectMenu.Click += new System.EventHandler(this.ToolbarOpenProjectMenu_Click);
// //
// toolStripSeparator6 // ToolbarOpenFilesMenu
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.ToolbarOpenFilesMenu.Name = "ToolbarOpenFilesMenu";
this.toolStripSeparator6.Size = new System.Drawing.Size(178, 6); this.ToolbarOpenFilesMenu.Size = new System.Drawing.Size(152, 22);
this.ToolbarOpenFilesMenu.Text = "Open Files...";
this.ToolbarOpenFilesMenu.Click += new System.EventHandler(this.ToolbarOpenFilesMenu_Click);
// //
// ToolbarOpenYmapMenu // ToolbarOpenFolderMenu
// //
this.ToolbarOpenYmapMenu.Name = "ToolbarOpenYmapMenu"; this.ToolbarOpenFolderMenu.Name = "ToolbarOpenFolderMenu";
this.ToolbarOpenYmapMenu.Size = new System.Drawing.Size(181, 22); this.ToolbarOpenFolderMenu.Size = new System.Drawing.Size(152, 22);
this.ToolbarOpenYmapMenu.Text = "Open Ymap File..."; this.ToolbarOpenFolderMenu.Text = "Open Folder...";
this.ToolbarOpenYmapMenu.Click += new System.EventHandler(this.ToolbarOpenYmapMenu_Click); this.ToolbarOpenFolderMenu.Click += new System.EventHandler(this.ToolbarOpenFolderMenu_Click);
//
// ToolbarOpenYtypMenu
//
this.ToolbarOpenYtypMenu.Name = "ToolbarOpenYtypMenu";
this.ToolbarOpenYtypMenu.Size = new System.Drawing.Size(181, 22);
this.ToolbarOpenYtypMenu.Text = "Open Ytyp File...";
this.ToolbarOpenYtypMenu.Click += new System.EventHandler(this.ToolbarOpenYtypMenu_Click);
//
// ToolbarOpenYbnMenu
//
this.ToolbarOpenYbnMenu.Name = "ToolbarOpenYbnMenu";
this.ToolbarOpenYbnMenu.Size = new System.Drawing.Size(181, 22);
this.ToolbarOpenYbnMenu.Text = "Open Ybn File...";
this.ToolbarOpenYbnMenu.Click += new System.EventHandler(this.ToolbarOpenYbnMenu_Click);
//
// ToolbarOpenYndMenu
//
this.ToolbarOpenYndMenu.Name = "ToolbarOpenYndMenu";
this.ToolbarOpenYndMenu.Size = new System.Drawing.Size(181, 22);
this.ToolbarOpenYndMenu.Text = "Open Ynd File...";
this.ToolbarOpenYndMenu.Click += new System.EventHandler(this.ToolbarOpenYndMenu_Click);
//
// ToolbarOpenYnvMenu
//
this.ToolbarOpenYnvMenu.Name = "ToolbarOpenYnvMenu";
this.ToolbarOpenYnvMenu.Size = new System.Drawing.Size(181, 22);
this.ToolbarOpenYnvMenu.Text = "Open Ynv File...";
this.ToolbarOpenYnvMenu.Click += new System.EventHandler(this.ToolbarOpenYnvMenu_Click);
//
// ToolbarOpenTrainsMenu
//
this.ToolbarOpenTrainsMenu.Name = "ToolbarOpenTrainsMenu";
this.ToolbarOpenTrainsMenu.Size = new System.Drawing.Size(181, 22);
this.ToolbarOpenTrainsMenu.Text = "Open Trains File...";
this.ToolbarOpenTrainsMenu.Click += new System.EventHandler(this.ToolbarOpenTrainsMenu_Click);
//
// ToolbarOpenScenarioMenu
//
this.ToolbarOpenScenarioMenu.Name = "ToolbarOpenScenarioMenu";
this.ToolbarOpenScenarioMenu.Size = new System.Drawing.Size(181, 22);
this.ToolbarOpenScenarioMenu.Text = "Open Scenario File...";
this.ToolbarOpenScenarioMenu.Click += new System.EventHandler(this.ToolbarOpenScenarioMenu_Click);
// //
// ToolbarSaveButton // ToolbarSaveButton
// //
@ -1651,14 +1538,6 @@
this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
// //
// YtypNewArchetypeFromYdrMenu
//
this.YtypNewArchetypeFromYdrMenu.Enabled = false;
this.YtypNewArchetypeFromYdrMenu.Name = "YtypNewArchetypeFromYdrMenu";
this.YtypNewArchetypeFromYdrMenu.Size = new System.Drawing.Size(218, 22);
this.YtypNewArchetypeFromYdrMenu.Text = "New Archetype from YDR...";
this.YtypNewArchetypeFromYdrMenu.Click += new System.EventHandler(this.YtypNewArchetypeFromYdrMenu_Click);
//
// ProjectForm // ProjectForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1706,7 +1585,6 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem FileNewMenu; private System.Windows.Forms.ToolStripMenuItem FileNewMenu;
private System.Windows.Forms.ToolStripMenuItem FileNewProjectMenu; private System.Windows.Forms.ToolStripMenuItem FileNewProjectMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenProjectMenu; private System.Windows.Forms.ToolStripMenuItem FileOpenProjectMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem FileCloseProjectMenu; private System.Windows.Forms.ToolStripMenuItem FileCloseProjectMenu;
@ -1720,13 +1598,7 @@
private System.Windows.Forms.ToolStripMenuItem FileNewYnvMenu; private System.Windows.Forms.ToolStripMenuItem FileNewYnvMenu;
private System.Windows.Forms.ToolStripMenuItem FileNewTrainsMenu; private System.Windows.Forms.ToolStripMenuItem FileNewTrainsMenu;
private System.Windows.Forms.ToolStripMenuItem FileNewScenarioMenu; private System.Windows.Forms.ToolStripMenuItem FileNewScenarioMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenYmapMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenYndMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenYnvMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenTrainsMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenScenarioMenu;
private System.Windows.Forms.ToolStripMenuItem FileNewYtypMenu; private System.Windows.Forms.ToolStripMenuItem FileNewYtypMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenYtypMenu;
private System.Windows.Forms.SaveFileDialog SaveFileDialog; private System.Windows.Forms.SaveFileDialog SaveFileDialog;
private System.Windows.Forms.OpenFileDialog OpenFileDialog; private System.Windows.Forms.OpenFileDialog OpenFileDialog;
private System.Windows.Forms.ToolStrip MainToolbar; private System.Windows.Forms.ToolStrip MainToolbar;
@ -1744,15 +1616,7 @@
private System.Windows.Forms.ToolStripMenuItem ToolbarNewTrainsMenu; private System.Windows.Forms.ToolStripMenuItem ToolbarNewTrainsMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarNewScenarioMenu; private System.Windows.Forms.ToolStripMenuItem ToolbarNewScenarioMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenProjectMenu; private System.Windows.Forms.ToolStripMenuItem ToolbarOpenProjectMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenYmapMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenYtypMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenYndMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenYnvMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenTrainsMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenScenarioMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripMenuItem EditUndoMenu; private System.Windows.Forms.ToolStripMenuItem EditUndoMenu;
private System.Windows.Forms.ToolStripMenuItem EditRedoMenu; private System.Windows.Forms.ToolStripMenuItem EditRedoMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10; private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
@ -1824,7 +1688,6 @@
private System.Windows.Forms.ToolStripMenuItem AudioAddToProjectMenu; private System.Windows.Forms.ToolStripMenuItem AudioAddToProjectMenu;
private System.Windows.Forms.ToolStripMenuItem AudioRemoveFromProjectMenu; private System.Windows.Forms.ToolStripMenuItem AudioRemoveFromProjectMenu;
private System.Windows.Forms.ToolStripMenuItem FileNewAudioDatMenu; private System.Windows.Forms.ToolStripMenuItem FileNewAudioDatMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenAudioDatMenu;
private System.Windows.Forms.ToolStripMenuItem AudioNewInteriorMenu; private System.Windows.Forms.ToolStripMenuItem AudioNewInteriorMenu;
private System.Windows.Forms.ToolStripMenuItem AudioNewInteriorRoomMenu; private System.Windows.Forms.ToolStripMenuItem AudioNewInteriorRoomMenu;
private System.Windows.Forms.ToolStripMenuItem ToolsLODLightsGeneratorMenu; private System.Windows.Forms.ToolStripMenuItem ToolsLODLightsGeneratorMenu;
@ -1854,14 +1717,17 @@
private System.Windows.Forms.ToolStripMenuItem YbnNewPolygonBoxMenu; private System.Windows.Forms.ToolStripMenuItem YbnNewPolygonBoxMenu;
private System.Windows.Forms.ToolStripMenuItem YbnNewPolygonCylinderMenu; private System.Windows.Forms.ToolStripMenuItem YbnNewPolygonCylinderMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarNewYbnMenu; private System.Windows.Forms.ToolStripMenuItem ToolbarNewYbnMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenYbnMenu;
private System.Windows.Forms.ToolStripMenuItem FileNewYbnMenu; private System.Windows.Forms.ToolStripMenuItem FileNewYbnMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenYbnMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator27; private System.Windows.Forms.ToolStripSeparator toolStripSeparator27;
private System.Windows.Forms.ToolStripMenuItem OptionsAutoCalcYmapFlagsMenu; private System.Windows.Forms.ToolStripMenuItem OptionsAutoCalcYmapFlagsMenu;
private System.Windows.Forms.ToolStripMenuItem OptionsAutoCalcYmapExtentsMenu; private System.Windows.Forms.ToolStripMenuItem OptionsAutoCalcYmapExtentsMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator28; private System.Windows.Forms.ToolStripSeparator toolStripSeparator28;
private System.Windows.Forms.ToolStripMenuItem OptionsDisplayEntityIndexesMenu; private System.Windows.Forms.ToolStripMenuItem OptionsDisplayEntityIndexesMenu;
private System.Windows.Forms.ToolStripMenuItem YtypNewArchetypeFromYdrMenu; private System.Windows.Forms.ToolStripMenuItem YtypNewArchetypeFromYdrMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenFilesMenu;
private System.Windows.Forms.ToolStripMenuItem FileOpenFolderMenu;
private System.Windows.Forms.FolderBrowserDialog FolderBrowserDialog;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenFilesMenu;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenFolderMenu;
} }
} }

View File

@ -1435,43 +1435,163 @@ namespace CodeWalker.Project
SetProjectHasChanged(false); SetProjectHasChanged(false);
} }
public void Save() public void OpenFolder()
{
if (FolderBrowserDialog.ShowDialogNew() != DialogResult.OK) return;
var folder = FolderBrowserDialog.SelectedPath;
var files = Directory.GetFiles(folder, "*", SearchOption.AllDirectories);
if (files == null) return;
if (files.Length > 100)
{
if (MessageBox.Show("This folder contains many files, loading may take a long time!\nAre you sure you want to continue?", "Large folder warning", MessageBoxButtons.YesNo) != DialogResult.Yes)
{
return;
}
}
OpenFiles(files);
}
public void OpenFiles(string[] files = null)
{
if (files == null)
{
string[] filetypes = {
"All supported|*.ymap;*.ytyp;*.ybn;*.ynd;*.ynv;*.dat;*.ymt;*.rel",
"Ymap files|*.ymap",
"Ytyp files|*.ytyp",
"Ybn files|*.ybn",
"Ynd files|*.ynd",
"Ynv files|*.ynv",
"Dat files|*.dat",
"Ymt files|*.ymt",
"Rel files|*.rel",
"All files|*.*"
};
files = ShowOpenDialogMulti(string.Join("|", filetypes), string.Empty);
}
if (files == null) return;
if (files.Length == 0) return;
if (CurrentProjectFile == null)
{
NewProject();
}
var errorFiles = new List<string>();
foreach (var file in files)
{
try
{
if (!File.Exists(file)) continue;
var fl = file.ToLowerInvariant();
var fn = Path.GetFileName(fl);
var ext = Path.GetExtension(fl);
switch (ext)
{
case ".ymap":
var ymap = CurrentProjectFile.AddYmapFile(file);
if (ymap != null) LoadYmapFromFile(ymap, file);
break;
case ".ytyp":
var ytyp = CurrentProjectFile.AddYtypFile(file);
if (ytyp != null) LoadYtypFromFile(ytyp, file);
break;
case ".ybn":
var ybn = CurrentProjectFile.AddYbnFile(file);
if (ybn != null) LoadYbnFromFile(ybn, file);
break;
case ".ynd":
var ynd = CurrentProjectFile.AddYndFile(file);
if (ynd != null) LoadYndFromFile(ynd, file);
break;
case ".ynv":
var ynv = CurrentProjectFile.AddYnvFile(file);
if (ynv != null) LoadYnvFromFile(ynv, file);
break;
case ".ymt":
var ymtdata = File.ReadAllBytes(file);
var ymt = new YmtFile();
ymt.Load(ymtdata);
ymt.RpfFileEntry.Name = Path.GetFileName(file);
ymt.FilePath = file;
ymt.Name = ymt.RpfFileEntry.Name;
if (ymt.ContentType == YmtFileContentType.ScenarioPointRegion)
{
CurrentProjectFile.AddScenarioFile(ymt);
}
break;
case ".dat":
if (fn.StartsWith("trains"))
{
var track = CurrentProjectFile.AddTrainsFile(file);
if (track != null) LoadTrainTrackFromFile(track, file);
}
break;
case ".rel":
if (fn.EndsWith(".dat151.rel"))
{
var dat151 = CurrentProjectFile.AddAudioRelFile(file);
if (dat151 != null) LoadAudioRelFromFile(dat151, file);
}
break;
}
}
catch
{
errorFiles.Add(file);
}
}
SetProjectHasChanged(true);
LoadProjectTree();
if (errorFiles.Count > 0)
{
MessageBox.Show("Errors were encountered while loading file(s):\n" + String.Join("\n", errorFiles));
}
}
public void Save(bool saveas = false)
{ {
if (CurrentYmapFile != null) if (CurrentYmapFile != null)
{ {
SaveYmap(); SaveYmap(saveas);
} }
else if (CurrentYtypFile != null) else if (CurrentYtypFile != null)
{ {
SaveYtyp(); SaveYtyp(saveas);
} }
else if (CurrentYbnFile != null) else if (CurrentYbnFile != null)
{ {
SaveYbn(); SaveYbn(saveas);
} }
else if (CurrentYndFile != null) else if (CurrentYndFile != null)
{ {
SaveYnd(); SaveYnd(saveas);
} }
else if (CurrentYnvFile != null) else if (CurrentYnvFile != null)
{ {
SaveYnv(); SaveYnv(saveas);
} }
else if (CurrentTrainTrack != null) else if (CurrentTrainTrack != null)
{ {
SaveTrainTrack(); SaveTrainTrack(saveas);
} }
else if (CurrentScenario != null) else if (CurrentScenario != null)
{ {
SaveScenario(); SaveScenario(saveas);
} }
else if (CurrentAudioFile != null) else if (CurrentAudioFile != null)
{ {
SaveAudioFile(); SaveAudioFile(saveas);
} }
else if (CurrentProjectFile != null) else if (CurrentProjectFile != null)
{ {
SaveProject(); SaveProject(saveas);
} }
} }
public void SaveAll() public void SaveAll()
@ -1578,42 +1698,6 @@ namespace CodeWalker.Project
SaveProject(); SaveProject();
} }
} }
public void SaveCurrentItem(bool saveas = false)
{
if (CurrentYmapFile != null)
{
SaveYmap(saveas);
}
else if (CurrentYtypFile != null)
{
SaveYtyp(saveas);
}
else if (CurrentYbnFile != null)
{
SaveYbn(saveas);
}
else if (CurrentYndFile != null)
{
SaveYnd(saveas);
}
else if (CurrentYnvFile != null)
{
SaveYnv(saveas);
}
else if (CurrentTrainTrack != null)
{
SaveTrainTrack(saveas);
}
else if (CurrentScenario != null)
{
SaveScenario(saveas);
}
else if (CurrentAudioFile != null)
{
SaveAudioFile(saveas);
}
}
@ -1733,40 +1817,6 @@ namespace CodeWalker.Project
LoadProjectTree(); LoadProjectTree();
} }
public void OpenYmap()
{
string[] files = ShowOpenDialogMulti("Ymap files|*.ymap", string.Empty);
if (files == null)
{
return;
}
if (CurrentProjectFile == null)
{
NewProject();
}
foreach (string file in files)
{
if (!File.Exists(file)) continue;
var ymap = CurrentProjectFile.AddYmapFile(file);
if (ymap != null)
{
SetProjectHasChanged(true);
LoadYmapFromFile(ymap, file);
LoadProjectTree();
}
else
{
MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project.");
}
}
}
public void SaveYmap(bool saveas = false) public void SaveYmap(bool saveas = false)
{ {
if (CurrentYmapFile == null) return; if (CurrentYmapFile == null) return;
@ -3062,40 +3112,6 @@ namespace CodeWalker.Project
LoadProjectTree(); LoadProjectTree();
} }
public void OpenYtyp()
{
string[] files = ShowOpenDialogMulti("Ytyp files|*.ytyp", string.Empty);
if (files == null)
{
return;
}
if (CurrentProjectFile == null)
{
NewProject();
}
foreach (string file in files)
{
if (!File.Exists(file)) continue;
var ytyp = CurrentProjectFile.AddYtypFile(file);
if (ytyp != null)
{
SetProjectHasChanged(true);
LoadYtypFromFile(ytyp, file);
LoadProjectTree();
}
else
{
MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project.");
}
}
}
public void SaveYtyp(bool saveas = false) public void SaveYtyp(bool saveas = false)
{ {
if (CurrentYtypFile == null) return; if (CurrentYtypFile == null) return;
@ -3796,40 +3812,6 @@ namespace CodeWalker.Project
LoadProjectTree(); LoadProjectTree();
} }
public void OpenYbn()
{
string[] files = ShowOpenDialogMulti("Ybn files|*.ybn", string.Empty);
if (files == null)
{
return;
}
if (CurrentProjectFile == null)
{
NewProject();
}
foreach (string file in files)
{
if (!File.Exists(file)) continue;
var ybn = CurrentProjectFile.AddYbnFile(file);
if (ybn != null)
{
SetProjectHasChanged(true);
LoadYbnFromFile(ybn, file);
LoadProjectTree();
}
else
{
MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project.");
}
}
}
public void SaveYbn(bool saveas = false) public void SaveYbn(bool saveas = false)
{ {
if ((CurrentYbnFile == null) && (CurrentCollisionBounds != null)) CurrentYbnFile = CurrentCollisionBounds.GetRootYbn(); if ((CurrentYbnFile == null) && (CurrentCollisionBounds != null)) CurrentYbnFile = CurrentCollisionBounds.GetRootYbn();
@ -4459,40 +4441,6 @@ namespace CodeWalker.Project
LoadProjectTree(); LoadProjectTree();
} }
public void OpenYnd()
{
string[] files = ShowOpenDialogMulti("Ynd files|*.ynd", string.Empty);
if (files == null)
{
return;
}
if (CurrentProjectFile == null)
{
NewProject();
}
foreach (string file in files)
{
if (!File.Exists(file)) continue;
var ynd = CurrentProjectFile.AddYndFile(file);
if (ynd != null)
{
SetProjectHasChanged(true);
LoadYndFromFile(ynd, file);
LoadProjectTree();
}
else
{
MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project.");
}
}
}
public void SaveYnd(bool saveas = false) public void SaveYnd(bool saveas = false)
{ {
if ((CurrentYndFile == null) && (CurrentPathNode != null)) CurrentYndFile = CurrentPathNode.Ynd; if ((CurrentYndFile == null) && (CurrentPathNode != null)) CurrentYndFile = CurrentPathNode.Ynd;
@ -4769,40 +4717,6 @@ namespace CodeWalker.Project
LoadProjectTree(); LoadProjectTree();
} }
public void OpenYnv()
{
string[] files = ShowOpenDialogMulti("Ynv files|*.ynv", string.Empty);
if (files == null)
{
return;
}
if (CurrentProjectFile == null)
{
NewProject();
}
foreach (string file in files)
{
if (!File.Exists(file)) continue;
var ynv = CurrentProjectFile.AddYnvFile(file);
if (ynv != null)
{
SetProjectHasChanged(true);
LoadYnvFromFile(ynv, file);
LoadProjectTree();
}
else
{
MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project.");
}
}
}
public void SaveYnv(bool saveas = false) public void SaveYnv(bool saveas = false)
{ {
if ((CurrentYnvFile == null) && (CurrentNavPoly != null)) CurrentYnvFile = CurrentNavPoly.Ynv; if ((CurrentYnvFile == null) && (CurrentNavPoly != null)) CurrentYnvFile = CurrentNavPoly.Ynv;
@ -4984,40 +4898,6 @@ namespace CodeWalker.Project
LoadProjectTree(); LoadProjectTree();
} }
public void OpenTrainTrack()
{
string[] files = ShowOpenDialogMulti("Dat files|*.dat", string.Empty);
if (files == null)
{
return;
}
if (CurrentProjectFile == null)
{
NewProject();
}
foreach (string file in files)
{
if (!File.Exists(file)) continue;
var track = CurrentProjectFile.AddTrainsFile(file);
if (track != null)
{
SetProjectHasChanged(true);
LoadTrainTrackFromFile(track, file);
LoadProjectTree();
}
else
{
MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project.");
}
}
}
public void SaveTrainTrack(bool saveas = false) public void SaveTrainTrack(bool saveas = false)
{ {
if ((CurrentTrainTrack == null) && (CurrentTrainNode != null)) CurrentTrainTrack = CurrentTrainNode.Track; if ((CurrentTrainTrack == null) && (CurrentTrainNode != null)) CurrentTrainTrack = CurrentTrainNode.Track;
@ -5266,40 +5146,6 @@ namespace CodeWalker.Project
LoadProjectTree(); LoadProjectTree();
} }
public void OpenScenario()
{
string[] files = ShowOpenDialogMulti("Ymt files|*.ymt", string.Empty);
if (files == null)
{
return;
}
if (CurrentProjectFile == null)
{
NewProject();
}
foreach (string file in files)
{
if (!File.Exists(file)) continue;
var ymt = CurrentProjectFile.AddScenarioFile(file);
if (ymt != null)
{
SetProjectHasChanged(true);
LoadScenarioFromFile(ymt, file);
LoadProjectTree();
}
else
{
MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project.");
}
}
}
public void SaveScenario(bool saveas = false) public void SaveScenario(bool saveas = false)
{ {
if ((CurrentScenario == null) && (CurrentScenarioNode != null)) CurrentScenario = CurrentScenarioNode.Ymt; if ((CurrentScenario == null) && (CurrentScenarioNode != null)) CurrentScenario = CurrentScenarioNode.Ymt;
@ -6271,40 +6117,6 @@ namespace CodeWalker.Project
LoadProjectTree(); LoadProjectTree();
} }
public void OpenAudioFile()
{
string[] files = ShowOpenDialogMulti("DatRel files|*.rel", string.Empty); //TODO: better filter?
if (files == null)
{
return;
}
if (CurrentProjectFile == null)
{
NewProject();
}
foreach (string file in files)
{
if (!File.Exists(file)) continue;
var rel = CurrentProjectFile.AddAudioRelFile(file);
if (rel != null)
{
SetProjectHasChanged(true);
LoadAudioRelFromFile(rel, file);
LoadProjectTree();
}
else
{
MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project.");
}
}
}
public void SaveAudioFile(bool saveas = false) public void SaveAudioFile(bool saveas = false)
{ {
if (CurrentAudioFile == null) return; if (CurrentAudioFile == null) return;
@ -9035,37 +8847,13 @@ namespace CodeWalker.Project
{ {
OpenProject(); OpenProject();
} }
private void FileOpenYmapMenu_Click(object sender, EventArgs e) private void FileOpenFilesMenu_Click(object sender, EventArgs e)
{ {
OpenYmap(); OpenFiles();
} }
private void FileOpenYtypMenu_Click(object sender, EventArgs e) private void FileOpenFolderMenu_Click(object sender, EventArgs e)
{ {
OpenYtyp(); OpenFolder();
}
private void FileOpenYbnMenu_Click(object sender, EventArgs e)
{
OpenYbn();
}
private void FileOpenYndMenu_Click(object sender, EventArgs e)
{
OpenYnd();
}
private void FileOpenYnvMenu_Click(object sender, EventArgs e)
{
OpenYnv();
}
private void FileOpenTrainsMenu_Click(object sender, EventArgs e)
{
OpenTrainTrack();
}
private void FileOpenScenarioMenu_Click(object sender, EventArgs e)
{
OpenScenario();
}
private void FileOpenAudioDatMenu_Click(object sender, EventArgs e)
{
OpenAudioFile();
} }
private void FileCloseProjectMenu_Click(object sender, EventArgs e) private void FileCloseProjectMenu_Click(object sender, EventArgs e)
{ {
@ -9081,11 +8869,11 @@ namespace CodeWalker.Project
} }
private void FileSaveItemMenu_Click(object sender, EventArgs e) private void FileSaveItemMenu_Click(object sender, EventArgs e)
{ {
SaveCurrentItem(); Save();
} }
private void FileSaveItemAsMenu_Click(object sender, EventArgs e) private void FileSaveItemAsMenu_Click(object sender, EventArgs e)
{ {
SaveCurrentItem(true); Save(true);
} }
private void ViewProjectExplorerMenu_Click(object sender, EventArgs e) private void ViewProjectExplorerMenu_Click(object sender, EventArgs e)
@ -9441,40 +9229,20 @@ namespace CodeWalker.Project
} }
else else
{ {
OpenYmap(); OpenFiles();
} }
} }
private void ToolbarOpenProjectMenu_Click(object sender, EventArgs e) private void ToolbarOpenProjectMenu_Click(object sender, EventArgs e)
{ {
OpenProject(); OpenProject();
} }
private void ToolbarOpenYmapMenu_Click(object sender, EventArgs e) private void ToolbarOpenFilesMenu_Click(object sender, EventArgs e)
{ {
OpenYmap(); OpenFiles();
} }
private void ToolbarOpenYtypMenu_Click(object sender, EventArgs e) private void ToolbarOpenFolderMenu_Click(object sender, EventArgs e)
{ {
OpenYtyp(); OpenFolder();
}
private void ToolbarOpenYbnMenu_Click(object sender, EventArgs e)
{
OpenYbn();
}
private void ToolbarOpenYndMenu_Click(object sender, EventArgs e)
{
OpenYnd();
}
private void ToolbarOpenYnvMenu_Click(object sender, EventArgs e)
{
OpenYnv();
}
private void ToolbarOpenTrainsMenu_Click(object sender, EventArgs e)
{
OpenTrainTrack();
}
private void ToolbarOpenScenarioMenu_Click(object sender, EventArgs e)
{
OpenScenario();
} }
private void ToolbarSaveButton_Click(object sender, EventArgs e) private void ToolbarSaveButton_Click(object sender, EventArgs e)
{ {
@ -9484,5 +9252,6 @@ namespace CodeWalker.Project
{ {
SaveAll(); SaveAll();
} }
} }
} }

View File

@ -169,6 +169,9 @@
KHyGEDQAROMzBKcByAbBFOLCxAcWLjBqAMQAYjBUORpgYAAATWQCY5khhWoAAAAASUVORK5CYII= KHyGEDQAROMzBKcByAbBFOLCxAcWLjBqAMQAYjBUORpgYAAATWQCY5khhWoAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>626, 21</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAMAICAAAAAAGACoDAAANgAAABAQAAAAABgAaAMAAN4MAABAQAAAAAAYACgyAABGEAAAKAAAACAA AAABAAMAICAAAAAAGACoDAAANgAAABAQAAAAABgAaAMAAN4MAABAQAAAAAAYACgyAABGEAAAKAAAACAA

View File

@ -243,12 +243,8 @@ namespace CodeWalker
this.ToolbarNewScenarioButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarNewScenarioButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenButton = new System.Windows.Forms.ToolStripSplitButton(); this.ToolbarOpenButton = new System.Windows.Forms.ToolStripSplitButton();
this.ToolbarOpenProjectButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarOpenProjectButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenYmapButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarOpenFilesButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenYtypButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarOpenFolderButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenYbnButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenYndButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenTrainsButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarOpenScenarioButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSaveButton = new System.Windows.Forms.ToolStripButton(); this.ToolbarSaveButton = new System.Windows.Forms.ToolStripButton();
this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton(); this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
@ -260,6 +256,8 @@ namespace CodeWalker
this.ToolbarSelectCarGeneratorButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarSelectCarGeneratorButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSelectGrassButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarSelectGrassButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSelectWaterQuadButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarSelectWaterQuadButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSelectCalmingQuadButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSelectWaveQuadButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSelectCollisionButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarSelectCollisionButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSelectNavMeshButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarSelectNavMeshButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSelectPathButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarSelectPathButton = new System.Windows.Forms.ToolStripMenuItem();
@ -312,8 +310,6 @@ namespace CodeWalker
this.ToolbarPanel = new System.Windows.Forms.Panel(); this.ToolbarPanel = new System.Windows.Forms.Panel();
this.SubtitleLabel = new System.Windows.Forms.Label(); this.SubtitleLabel = new System.Windows.Forms.Label();
this.SubtitleTimer = new System.Windows.Forms.Timer(this.components); this.SubtitleTimer = new System.Windows.Forms.Timer(this.components);
this.ToolbarSelectCalmingQuadButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarSelectWaveQuadButton = new System.Windows.Forms.ToolStripMenuItem();
this.StatusStrip.SuspendLayout(); this.StatusStrip.SuspendLayout();
this.ToolsPanel.SuspendLayout(); this.ToolsPanel.SuspendLayout();
this.ToolsTabControl.SuspendLayout(); this.ToolsTabControl.SuspendLayout();
@ -2929,50 +2925,50 @@ namespace CodeWalker
// ToolbarNewProjectButton // ToolbarNewProjectButton
// //
this.ToolbarNewProjectButton.Name = "ToolbarNewProjectButton"; this.ToolbarNewProjectButton.Name = "ToolbarNewProjectButton";
this.ToolbarNewProjectButton.Size = new System.Drawing.Size(164, 22); this.ToolbarNewProjectButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarNewProjectButton.Text = "New project"; this.ToolbarNewProjectButton.Text = "New Project";
this.ToolbarNewProjectButton.Click += new System.EventHandler(this.ToolbarNewProjectButton_Click); this.ToolbarNewProjectButton.Click += new System.EventHandler(this.ToolbarNewProjectButton_Click);
// //
// ToolbarNewYmapButton // ToolbarNewYmapButton
// //
this.ToolbarNewYmapButton.Name = "ToolbarNewYmapButton"; this.ToolbarNewYmapButton.Name = "ToolbarNewYmapButton";
this.ToolbarNewYmapButton.Size = new System.Drawing.Size(164, 22); this.ToolbarNewYmapButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarNewYmapButton.Text = "New ymap file"; this.ToolbarNewYmapButton.Text = "New Ymap File";
this.ToolbarNewYmapButton.Click += new System.EventHandler(this.ToolbarNewYmapButton_Click); this.ToolbarNewYmapButton.Click += new System.EventHandler(this.ToolbarNewYmapButton_Click);
// //
// ToolbarNewYtypButton // ToolbarNewYtypButton
// //
this.ToolbarNewYtypButton.Name = "ToolbarNewYtypButton"; this.ToolbarNewYtypButton.Name = "ToolbarNewYtypButton";
this.ToolbarNewYtypButton.Size = new System.Drawing.Size(164, 22); this.ToolbarNewYtypButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarNewYtypButton.Text = "New ytyp file"; this.ToolbarNewYtypButton.Text = "New Ytyp File";
this.ToolbarNewYtypButton.Click += new System.EventHandler(this.ToolbarNewYtypButton_Click); this.ToolbarNewYtypButton.Click += new System.EventHandler(this.ToolbarNewYtypButton_Click);
// //
// ToolbarNewYbnButton // ToolbarNewYbnButton
// //
this.ToolbarNewYbnButton.Name = "ToolbarNewYbnButton"; this.ToolbarNewYbnButton.Name = "ToolbarNewYbnButton";
this.ToolbarNewYbnButton.Size = new System.Drawing.Size(164, 22); this.ToolbarNewYbnButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarNewYbnButton.Text = "New ybn file"; this.ToolbarNewYbnButton.Text = "New Ybn File";
this.ToolbarNewYbnButton.Click += new System.EventHandler(this.ToolbarNewYbnButton_Click); this.ToolbarNewYbnButton.Click += new System.EventHandler(this.ToolbarNewYbnButton_Click);
// //
// ToolbarNewYndButton // ToolbarNewYndButton
// //
this.ToolbarNewYndButton.Name = "ToolbarNewYndButton"; this.ToolbarNewYndButton.Name = "ToolbarNewYndButton";
this.ToolbarNewYndButton.Size = new System.Drawing.Size(164, 22); this.ToolbarNewYndButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarNewYndButton.Text = "New ynd file"; this.ToolbarNewYndButton.Text = "New Ynd File";
this.ToolbarNewYndButton.Click += new System.EventHandler(this.ToolbarNewYndButton_Click); this.ToolbarNewYndButton.Click += new System.EventHandler(this.ToolbarNewYndButton_Click);
// //
// ToolbarNewTrainsButton // ToolbarNewTrainsButton
// //
this.ToolbarNewTrainsButton.Name = "ToolbarNewTrainsButton"; this.ToolbarNewTrainsButton.Name = "ToolbarNewTrainsButton";
this.ToolbarNewTrainsButton.Size = new System.Drawing.Size(164, 22); this.ToolbarNewTrainsButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarNewTrainsButton.Text = "New trains file"; this.ToolbarNewTrainsButton.Text = "New Trains File";
this.ToolbarNewTrainsButton.Click += new System.EventHandler(this.ToolbarNewTrainsButton_Click); this.ToolbarNewTrainsButton.Click += new System.EventHandler(this.ToolbarNewTrainsButton_Click);
// //
// ToolbarNewScenarioButton // ToolbarNewScenarioButton
// //
this.ToolbarNewScenarioButton.Name = "ToolbarNewScenarioButton"; this.ToolbarNewScenarioButton.Name = "ToolbarNewScenarioButton";
this.ToolbarNewScenarioButton.Size = new System.Drawing.Size(164, 22); this.ToolbarNewScenarioButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarNewScenarioButton.Text = "New scenario file"; this.ToolbarNewScenarioButton.Text = "New Scenario File";
this.ToolbarNewScenarioButton.Click += new System.EventHandler(this.ToolbarNewScenarioButton_Click); this.ToolbarNewScenarioButton.Click += new System.EventHandler(this.ToolbarNewScenarioButton_Click);
// //
// ToolbarOpenButton // ToolbarOpenButton
@ -2980,12 +2976,8 @@ namespace CodeWalker
this.ToolbarOpenButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.ToolbarOpenButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.ToolbarOpenButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ToolbarOpenButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolbarOpenProjectButton, this.ToolbarOpenProjectButton,
this.ToolbarOpenYmapButton, this.ToolbarOpenFilesButton,
this.ToolbarOpenYtypButton, this.ToolbarOpenFolderButton});
this.ToolbarOpenYbnButton,
this.ToolbarOpenYndButton,
this.ToolbarOpenTrainsButton,
this.ToolbarOpenScenarioButton});
this.ToolbarOpenButton.Enabled = false; this.ToolbarOpenButton.Enabled = false;
this.ToolbarOpenButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarOpenButton.Image"))); this.ToolbarOpenButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarOpenButton.Image")));
this.ToolbarOpenButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.ToolbarOpenButton.ImageTransparentColor = System.Drawing.Color.Magenta;
@ -2998,51 +2990,23 @@ namespace CodeWalker
// ToolbarOpenProjectButton // ToolbarOpenProjectButton
// //
this.ToolbarOpenProjectButton.Name = "ToolbarOpenProjectButton"; this.ToolbarOpenProjectButton.Name = "ToolbarOpenProjectButton";
this.ToolbarOpenProjectButton.Size = new System.Drawing.Size(178, 22); this.ToolbarOpenProjectButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarOpenProjectButton.Text = "Open project..."; this.ToolbarOpenProjectButton.Text = "Open Project...";
this.ToolbarOpenProjectButton.Click += new System.EventHandler(this.ToolbarOpenProjectButton_Click); this.ToolbarOpenProjectButton.Click += new System.EventHandler(this.ToolbarOpenProjectButton_Click);
// //
// ToolbarOpenYmapButton // ToolbarOpenFilesButton
// //
this.ToolbarOpenYmapButton.Name = "ToolbarOpenYmapButton"; this.ToolbarOpenFilesButton.Name = "ToolbarOpenFilesButton";
this.ToolbarOpenYmapButton.Size = new System.Drawing.Size(178, 22); this.ToolbarOpenFilesButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarOpenYmapButton.Text = "Open ymap file..."; this.ToolbarOpenFilesButton.Text = "Open Files...";
this.ToolbarOpenYmapButton.Click += new System.EventHandler(this.ToolbarOpenYmapButton_Click); this.ToolbarOpenFilesButton.Click += new System.EventHandler(this.ToolbarOpenFilesButton_Click);
// //
// ToolbarOpenYtypButton // ToolbarOpenFolderButton
// //
this.ToolbarOpenYtypButton.Name = "ToolbarOpenYtypButton"; this.ToolbarOpenFolderButton.Name = "ToolbarOpenFolderButton";
this.ToolbarOpenYtypButton.Size = new System.Drawing.Size(178, 22); this.ToolbarOpenFolderButton.Size = new System.Drawing.Size(180, 22);
this.ToolbarOpenYtypButton.Text = "Open ytyp file..."; this.ToolbarOpenFolderButton.Text = "Open Folder...";
this.ToolbarOpenYtypButton.Click += new System.EventHandler(this.ToolbarOpenYtypButton_Click); this.ToolbarOpenFolderButton.Click += new System.EventHandler(this.ToolbarOpenFolderButton_Click);
//
// ToolbarOpenYbnButton
//
this.ToolbarOpenYbnButton.Name = "ToolbarOpenYbnButton";
this.ToolbarOpenYbnButton.Size = new System.Drawing.Size(178, 22);
this.ToolbarOpenYbnButton.Text = "Open ybn file...";
this.ToolbarOpenYbnButton.Click += new System.EventHandler(this.ToolbarOpenYbnButton_Click);
//
// ToolbarOpenYndButton
//
this.ToolbarOpenYndButton.Name = "ToolbarOpenYndButton";
this.ToolbarOpenYndButton.Size = new System.Drawing.Size(178, 22);
this.ToolbarOpenYndButton.Text = "Open ynd file...";
this.ToolbarOpenYndButton.Click += new System.EventHandler(this.ToolbarOpenYndButton_Click);
//
// ToolbarOpenTrainsButton
//
this.ToolbarOpenTrainsButton.Name = "ToolbarOpenTrainsButton";
this.ToolbarOpenTrainsButton.Size = new System.Drawing.Size(178, 22);
this.ToolbarOpenTrainsButton.Text = "Open trains file...";
this.ToolbarOpenTrainsButton.Click += new System.EventHandler(this.ToolbarOpenTrainsButton_Click);
//
// ToolbarOpenScenarioButton
//
this.ToolbarOpenScenarioButton.Name = "ToolbarOpenScenarioButton";
this.ToolbarOpenScenarioButton.Size = new System.Drawing.Size(178, 22);
this.ToolbarOpenScenarioButton.Text = "Open scenario file...";
this.ToolbarOpenScenarioButton.Click += new System.EventHandler(this.ToolbarOpenScenarioButton_Click);
// //
// ToolbarSaveButton // ToolbarSaveButton
// //
@ -3108,112 +3072,126 @@ namespace CodeWalker
this.ToolbarSelectEntityButton.Checked = true; this.ToolbarSelectEntityButton.Checked = true;
this.ToolbarSelectEntityButton.CheckState = System.Windows.Forms.CheckState.Checked; this.ToolbarSelectEntityButton.CheckState = System.Windows.Forms.CheckState.Checked;
this.ToolbarSelectEntityButton.Name = "ToolbarSelectEntityButton"; this.ToolbarSelectEntityButton.Name = "ToolbarSelectEntityButton";
this.ToolbarSelectEntityButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectEntityButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectEntityButton.Text = "Entity"; this.ToolbarSelectEntityButton.Text = "Entity";
this.ToolbarSelectEntityButton.Click += new System.EventHandler(this.ToolbarSelectEntityButton_Click); this.ToolbarSelectEntityButton.Click += new System.EventHandler(this.ToolbarSelectEntityButton_Click);
// //
// ToolbarSelectEntityExtensionButton // ToolbarSelectEntityExtensionButton
// //
this.ToolbarSelectEntityExtensionButton.Name = "ToolbarSelectEntityExtensionButton"; this.ToolbarSelectEntityExtensionButton.Name = "ToolbarSelectEntityExtensionButton";
this.ToolbarSelectEntityExtensionButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectEntityExtensionButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectEntityExtensionButton.Text = "Entity Extension"; this.ToolbarSelectEntityExtensionButton.Text = "Entity Extension";
this.ToolbarSelectEntityExtensionButton.Click += new System.EventHandler(this.ToolbarSelectEntityExtensionButton_Click); this.ToolbarSelectEntityExtensionButton.Click += new System.EventHandler(this.ToolbarSelectEntityExtensionButton_Click);
// //
// ToolbarSelectArchetypeExtensionButton // ToolbarSelectArchetypeExtensionButton
// //
this.ToolbarSelectArchetypeExtensionButton.Name = "ToolbarSelectArchetypeExtensionButton"; this.ToolbarSelectArchetypeExtensionButton.Name = "ToolbarSelectArchetypeExtensionButton";
this.ToolbarSelectArchetypeExtensionButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectArchetypeExtensionButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectArchetypeExtensionButton.Text = "Archetype Extension"; this.ToolbarSelectArchetypeExtensionButton.Text = "Archetype Extension";
this.ToolbarSelectArchetypeExtensionButton.Click += new System.EventHandler(this.ToolbarSelectArchetypeExtensionButton_Click); this.ToolbarSelectArchetypeExtensionButton.Click += new System.EventHandler(this.ToolbarSelectArchetypeExtensionButton_Click);
// //
// ToolbarSelectTimeCycleModifierButton // ToolbarSelectTimeCycleModifierButton
// //
this.ToolbarSelectTimeCycleModifierButton.Name = "ToolbarSelectTimeCycleModifierButton"; this.ToolbarSelectTimeCycleModifierButton.Name = "ToolbarSelectTimeCycleModifierButton";
this.ToolbarSelectTimeCycleModifierButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectTimeCycleModifierButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectTimeCycleModifierButton.Text = "Time Cycle Modifier"; this.ToolbarSelectTimeCycleModifierButton.Text = "Time Cycle Modifier";
this.ToolbarSelectTimeCycleModifierButton.Click += new System.EventHandler(this.ToolbarSelectTimeCycleModifierButton_Click); this.ToolbarSelectTimeCycleModifierButton.Click += new System.EventHandler(this.ToolbarSelectTimeCycleModifierButton_Click);
// //
// ToolbarSelectCarGeneratorButton // ToolbarSelectCarGeneratorButton
// //
this.ToolbarSelectCarGeneratorButton.Name = "ToolbarSelectCarGeneratorButton"; this.ToolbarSelectCarGeneratorButton.Name = "ToolbarSelectCarGeneratorButton";
this.ToolbarSelectCarGeneratorButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectCarGeneratorButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectCarGeneratorButton.Text = "Car Generator"; this.ToolbarSelectCarGeneratorButton.Text = "Car Generator";
this.ToolbarSelectCarGeneratorButton.Click += new System.EventHandler(this.ToolbarSelectCarGeneratorButton_Click); this.ToolbarSelectCarGeneratorButton.Click += new System.EventHandler(this.ToolbarSelectCarGeneratorButton_Click);
// //
// ToolbarSelectGrassButton // ToolbarSelectGrassButton
// //
this.ToolbarSelectGrassButton.Name = "ToolbarSelectGrassButton"; this.ToolbarSelectGrassButton.Name = "ToolbarSelectGrassButton";
this.ToolbarSelectGrassButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectGrassButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectGrassButton.Text = "Grass"; this.ToolbarSelectGrassButton.Text = "Grass";
this.ToolbarSelectGrassButton.Click += new System.EventHandler(this.ToolbarSelectGrassButton_Click); this.ToolbarSelectGrassButton.Click += new System.EventHandler(this.ToolbarSelectGrassButton_Click);
// //
// ToolbarSelectWaterQuadButton // ToolbarSelectWaterQuadButton
// //
this.ToolbarSelectWaterQuadButton.Name = "ToolbarSelectWaterQuadButton"; this.ToolbarSelectWaterQuadButton.Name = "ToolbarSelectWaterQuadButton";
this.ToolbarSelectWaterQuadButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectWaterQuadButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectWaterQuadButton.Text = "Water Quad"; this.ToolbarSelectWaterQuadButton.Text = "Water Quad";
this.ToolbarSelectWaterQuadButton.Click += new System.EventHandler(this.ToolbarSelectWaterQuadButton_Click); this.ToolbarSelectWaterQuadButton.Click += new System.EventHandler(this.ToolbarSelectWaterQuadButton_Click);
// //
// ToolbarSelectCalmingQuadButton
//
this.ToolbarSelectCalmingQuadButton.Name = "ToolbarSelectCalmingQuadButton";
this.ToolbarSelectCalmingQuadButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectCalmingQuadButton.Text = "Water Calming Quad";
this.ToolbarSelectCalmingQuadButton.Click += new System.EventHandler(this.ToolbarSelectCalmingQuadButton_Click);
//
// ToolbarSelectWaveQuadButton
//
this.ToolbarSelectWaveQuadButton.Name = "ToolbarSelectWaveQuadButton";
this.ToolbarSelectWaveQuadButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectWaveQuadButton.Text = "Water Wave Quad";
this.ToolbarSelectWaveQuadButton.Click += new System.EventHandler(this.ToolbarSelectWaveQuadButton_Click);
//
// ToolbarSelectCollisionButton // ToolbarSelectCollisionButton
// //
this.ToolbarSelectCollisionButton.Name = "ToolbarSelectCollisionButton"; this.ToolbarSelectCollisionButton.Name = "ToolbarSelectCollisionButton";
this.ToolbarSelectCollisionButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectCollisionButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectCollisionButton.Text = "Collision"; this.ToolbarSelectCollisionButton.Text = "Collision";
this.ToolbarSelectCollisionButton.Click += new System.EventHandler(this.ToolbarSelectCollisionButton_Click); this.ToolbarSelectCollisionButton.Click += new System.EventHandler(this.ToolbarSelectCollisionButton_Click);
// //
// ToolbarSelectNavMeshButton // ToolbarSelectNavMeshButton
// //
this.ToolbarSelectNavMeshButton.Name = "ToolbarSelectNavMeshButton"; this.ToolbarSelectNavMeshButton.Name = "ToolbarSelectNavMeshButton";
this.ToolbarSelectNavMeshButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectNavMeshButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectNavMeshButton.Text = "Nav Mesh"; this.ToolbarSelectNavMeshButton.Text = "Nav Mesh";
this.ToolbarSelectNavMeshButton.Click += new System.EventHandler(this.ToolbarSelectNavMeshButton_Click); this.ToolbarSelectNavMeshButton.Click += new System.EventHandler(this.ToolbarSelectNavMeshButton_Click);
// //
// ToolbarSelectPathButton // ToolbarSelectPathButton
// //
this.ToolbarSelectPathButton.Name = "ToolbarSelectPathButton"; this.ToolbarSelectPathButton.Name = "ToolbarSelectPathButton";
this.ToolbarSelectPathButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectPathButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectPathButton.Text = "Traffic Path"; this.ToolbarSelectPathButton.Text = "Traffic Path";
this.ToolbarSelectPathButton.Click += new System.EventHandler(this.ToolbarSelectPathButton_Click); this.ToolbarSelectPathButton.Click += new System.EventHandler(this.ToolbarSelectPathButton_Click);
// //
// ToolbarSelectTrainTrackButton // ToolbarSelectTrainTrackButton
// //
this.ToolbarSelectTrainTrackButton.Name = "ToolbarSelectTrainTrackButton"; this.ToolbarSelectTrainTrackButton.Name = "ToolbarSelectTrainTrackButton";
this.ToolbarSelectTrainTrackButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectTrainTrackButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectTrainTrackButton.Text = "Train Track"; this.ToolbarSelectTrainTrackButton.Text = "Train Track";
this.ToolbarSelectTrainTrackButton.Click += new System.EventHandler(this.ToolbarSelectTrainTrackButton_Click); this.ToolbarSelectTrainTrackButton.Click += new System.EventHandler(this.ToolbarSelectTrainTrackButton_Click);
// //
// ToolbarSelectLodLightsButton // ToolbarSelectLodLightsButton
// //
this.ToolbarSelectLodLightsButton.Name = "ToolbarSelectLodLightsButton"; this.ToolbarSelectLodLightsButton.Name = "ToolbarSelectLodLightsButton";
this.ToolbarSelectLodLightsButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectLodLightsButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectLodLightsButton.Text = "Lod Lights"; this.ToolbarSelectLodLightsButton.Text = "Lod Lights";
this.ToolbarSelectLodLightsButton.Click += new System.EventHandler(this.ToolbarSelectLodLightsButton_Click); this.ToolbarSelectLodLightsButton.Click += new System.EventHandler(this.ToolbarSelectLodLightsButton_Click);
// //
// ToolbarSelectMloInstanceButton // ToolbarSelectMloInstanceButton
// //
this.ToolbarSelectMloInstanceButton.Name = "ToolbarSelectMloInstanceButton"; this.ToolbarSelectMloInstanceButton.Name = "ToolbarSelectMloInstanceButton";
this.ToolbarSelectMloInstanceButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectMloInstanceButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectMloInstanceButton.Text = "Interior Instance"; this.ToolbarSelectMloInstanceButton.Text = "Interior Instance";
this.ToolbarSelectMloInstanceButton.Click += new System.EventHandler(this.ToolbarSelectMloInstanceButton_Click); this.ToolbarSelectMloInstanceButton.Click += new System.EventHandler(this.ToolbarSelectMloInstanceButton_Click);
// //
// ToolbarSelectScenarioButton // ToolbarSelectScenarioButton
// //
this.ToolbarSelectScenarioButton.Name = "ToolbarSelectScenarioButton"; this.ToolbarSelectScenarioButton.Name = "ToolbarSelectScenarioButton";
this.ToolbarSelectScenarioButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectScenarioButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectScenarioButton.Text = "Scenario"; this.ToolbarSelectScenarioButton.Text = "Scenario";
this.ToolbarSelectScenarioButton.Click += new System.EventHandler(this.ToolbarSelectScenarioButton_Click); this.ToolbarSelectScenarioButton.Click += new System.EventHandler(this.ToolbarSelectScenarioButton_Click);
// //
// ToolbarSelectAudioButton // ToolbarSelectAudioButton
// //
this.ToolbarSelectAudioButton.Name = "ToolbarSelectAudioButton"; this.ToolbarSelectAudioButton.Name = "ToolbarSelectAudioButton";
this.ToolbarSelectAudioButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectAudioButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectAudioButton.Text = "Audio"; this.ToolbarSelectAudioButton.Text = "Audio";
this.ToolbarSelectAudioButton.Click += new System.EventHandler(this.ToolbarSelectAudioButton_Click); this.ToolbarSelectAudioButton.Click += new System.EventHandler(this.ToolbarSelectAudioButton_Click);
// //
// ToolbarSelectOcclusionButton // ToolbarSelectOcclusionButton
// //
this.ToolbarSelectOcclusionButton.Name = "ToolbarSelectOcclusionButton"; this.ToolbarSelectOcclusionButton.Name = "ToolbarSelectOcclusionButton";
this.ToolbarSelectOcclusionButton.Size = new System.Drawing.Size(182, 22); this.ToolbarSelectOcclusionButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectOcclusionButton.Text = "Occlusion"; this.ToolbarSelectOcclusionButton.Text = "Occlusion";
this.ToolbarSelectOcclusionButton.Click += new System.EventHandler(this.ToolbarSelectOcclusionButton_Click); this.ToolbarSelectOcclusionButton.Click += new System.EventHandler(this.ToolbarSelectOcclusionButton_Click);
// //
@ -3610,20 +3588,6 @@ namespace CodeWalker
// //
this.SubtitleTimer.Tick += new System.EventHandler(this.SubtitleTimer_Tick); this.SubtitleTimer.Tick += new System.EventHandler(this.SubtitleTimer_Tick);
// //
// ToolbarSelectCalmingQuadButton
//
this.ToolbarSelectCalmingQuadButton.Name = "ToolbarSelectCalmingQuadButton";
this.ToolbarSelectCalmingQuadButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectCalmingQuadButton.Text = "Water Calming Quad";
this.ToolbarSelectCalmingQuadButton.Click += new System.EventHandler(this.ToolbarSelectCalmingQuadButton_Click);
//
// ToolbarSelectWaveQuadButton
//
this.ToolbarSelectWaveQuadButton.Name = "ToolbarSelectWaveQuadButton";
this.ToolbarSelectWaveQuadButton.Size = new System.Drawing.Size(185, 22);
this.ToolbarSelectWaveQuadButton.Text = "Water Wave Quad";
this.ToolbarSelectWaveQuadButton.Click += new System.EventHandler(this.ToolbarSelectWaveQuadButton_Click);
//
// WorldForm // WorldForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -3898,7 +3862,7 @@ namespace CodeWalker
private System.Windows.Forms.ToolStripMenuItem ToolbarNewYmapButton; private System.Windows.Forms.ToolStripMenuItem ToolbarNewYmapButton;
private System.Windows.Forms.ToolStripSplitButton ToolbarOpenButton; private System.Windows.Forms.ToolStripSplitButton ToolbarOpenButton;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenProjectButton; private System.Windows.Forms.ToolStripMenuItem ToolbarOpenProjectButton;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenYmapButton; private System.Windows.Forms.ToolStripMenuItem ToolbarOpenFilesButton;
private System.Windows.Forms.ToolStripButton ToolbarSaveButton; private System.Windows.Forms.ToolStripButton ToolbarSaveButton;
private System.Windows.Forms.ToolStripButton ToolbarSaveAllButton; private System.Windows.Forms.ToolStripButton ToolbarSaveAllButton;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
@ -3939,8 +3903,6 @@ namespace CodeWalker
private System.Windows.Forms.CheckBox PathBoundsCheckBox; private System.Windows.Forms.CheckBox PathBoundsCheckBox;
private System.Windows.Forms.ToolStripMenuItem ToolbarNewYndButton; private System.Windows.Forms.ToolStripMenuItem ToolbarNewYndButton;
private System.Windows.Forms.ToolStripMenuItem ToolbarNewTrainsButton; private System.Windows.Forms.ToolStripMenuItem ToolbarNewTrainsButton;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenYndButton;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenTrainsButton;
private System.Windows.Forms.CheckBox PathsDepthClipCheckBox; private System.Windows.Forms.CheckBox PathsDepthClipCheckBox;
private System.Windows.Forms.CheckBox TrainPathsCheckBox; private System.Windows.Forms.CheckBox TrainPathsCheckBox;
private System.Windows.Forms.ToolStripMenuItem ToolbarSelectNavMeshButton; private System.Windows.Forms.ToolStripMenuItem ToolbarSelectNavMeshButton;
@ -3955,7 +3917,6 @@ namespace CodeWalker
private System.Windows.Forms.ToolStripMenuItem ToolsMenuWorldSearch; private System.Windows.Forms.ToolStripMenuItem ToolsMenuWorldSearch;
private System.Windows.Forms.ToolStripMenuItem ToolsMenuRPFExplorer; private System.Windows.Forms.ToolStripMenuItem ToolsMenuRPFExplorer;
private System.Windows.Forms.ToolStripMenuItem ToolbarNewScenarioButton; private System.Windows.Forms.ToolStripMenuItem ToolbarNewScenarioButton;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenScenarioButton;
private System.Windows.Forms.CheckBox PopZonesCheckBox; private System.Windows.Forms.CheckBox PopZonesCheckBox;
private System.Windows.Forms.ToolStripMenuItem ToolbarSelectAudioButton; private System.Windows.Forms.ToolStripMenuItem ToolbarSelectAudioButton;
private System.Windows.Forms.CheckBox AudioOuterBoundsCheckBox; private System.Windows.Forms.CheckBox AudioOuterBoundsCheckBox;
@ -3979,9 +3940,8 @@ namespace CodeWalker
private System.Windows.Forms.Timer SubtitleTimer; private System.Windows.Forms.Timer SubtitleTimer;
private System.Windows.Forms.CheckBox DeferredShadingCheckBox; private System.Windows.Forms.CheckBox DeferredShadingCheckBox;
private System.Windows.Forms.ToolStripMenuItem ToolbarNewYbnButton; private System.Windows.Forms.ToolStripMenuItem ToolbarNewYbnButton;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenYbnButton;
private System.Windows.Forms.ToolStripMenuItem ToolbarNewYtypButton; private System.Windows.Forms.ToolStripMenuItem ToolbarNewYtypButton;
private System.Windows.Forms.ToolStripMenuItem ToolbarOpenYtypButton; private System.Windows.Forms.ToolStripMenuItem ToolbarOpenFolderButton;
private System.Windows.Forms.NumericUpDown SnapAngleUpDown; private System.Windows.Forms.NumericUpDown SnapAngleUpDown;
private System.Windows.Forms.Label label33; private System.Windows.Forms.Label label33;
private System.Windows.Forms.ToolStripMenuItem ToolbarRotationSnappingButton; private System.Windows.Forms.ToolStripMenuItem ToolbarRotationSnappingButton;

View File

@ -4999,11 +4999,6 @@ namespace CodeWalker
ShowProjectForm(); ShowProjectForm();
ProjectForm.NewYnd(); ProjectForm.NewYnd();
} }
private void NewYnv()
{
ShowProjectForm();
ProjectForm.NewYnv();
}
private void NewTrainTrack() private void NewTrainTrack()
{ {
ShowProjectForm(); ShowProjectForm();
@ -5014,18 +5009,13 @@ namespace CodeWalker
ShowProjectForm(); ShowProjectForm();
ProjectForm.NewScenario(); ProjectForm.NewScenario();
} }
private void NewAudioRel()
{
ShowProjectForm();
ProjectForm.NewAudioFile();
}
private void Open() private void Open()
{ {
ShowProjectForm(); ShowProjectForm();
if (ProjectForm.IsProjectLoaded) if (ProjectForm.IsProjectLoaded)
{ {
ProjectForm.OpenYmap(); ProjectForm.OpenFiles();
} }
else else
{ {
@ -5037,45 +5027,15 @@ namespace CodeWalker
ShowProjectForm(); ShowProjectForm();
ProjectForm.OpenProject(); ProjectForm.OpenProject();
} }
private void OpenYmap() private void OpenFiles()
{ {
ShowProjectForm(); ShowProjectForm();
ProjectForm.OpenYmap(); ProjectForm.OpenFiles();
} }
private void OpenYtyp() private void OpenFolder()
{ {
ShowProjectForm(); ShowProjectForm();
ProjectForm.OpenYtyp(); ProjectForm.OpenFolder();
}
private void OpenYbn()
{
ShowProjectForm();
ProjectForm.OpenYbn();
}
private void OpenYnd()
{
ShowProjectForm();
ProjectForm.OpenYnd();
}
private void OpenYnv()
{
ShowProjectForm();
ProjectForm.OpenYnv();
}
private void OpenTrainTrack()
{
ShowProjectForm();
ProjectForm.OpenTrainTrack();
}
private void OpenScenario()
{
ShowProjectForm();
ProjectForm.OpenScenario();
}
private void OpenAudioRel()
{
ShowProjectForm();
ProjectForm.OpenAudioFile();
} }
private void Save() private void Save()
{ {
@ -7280,34 +7240,14 @@ namespace CodeWalker
OpenProject(); OpenProject();
} }
private void ToolbarOpenYmapButton_Click(object sender, EventArgs e) private void ToolbarOpenFilesButton_Click(object sender, EventArgs e)
{ {
OpenYmap(); OpenFiles();
} }
private void ToolbarOpenYtypButton_Click(object sender, EventArgs e) private void ToolbarOpenFolderButton_Click(object sender, EventArgs e)
{ {
OpenYtyp(); OpenFolder();
}
private void ToolbarOpenYbnButton_Click(object sender, EventArgs e)
{
OpenYbn();
}
private void ToolbarOpenYndButton_Click(object sender, EventArgs e)
{
OpenYnd();
}
private void ToolbarOpenTrainsButton_Click(object sender, EventArgs e)
{
OpenTrainTrack();
}
private void ToolbarOpenScenarioButton_Click(object sender, EventArgs e)
{
OpenScenario();
} }
private void ToolbarSaveButton_Click(object sender, EventArgs e) private void ToolbarSaveButton_Click(object sender, EventArgs e)