diff --git a/Build/SlimDX.dll b/Build/SlimDX.dll index 8715ac4..c02903f 100644 Binary files a/Build/SlimDX.dll and b/Build/SlimDX.dll differ diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index 3bc0b05..f88e2fa 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -124,6 +124,7 @@ ArgumentBox.cs + Component @@ -1399,6 +1400,7 @@ VertexEditForm.cs + diff --git a/Source/Core/Windows/ResourceOptionsForm.Designer.cs b/Source/Core/Windows/ResourceOptionsForm.Designer.cs index bcdd04b..8b7da7a 100644 --- a/Source/Core/Windows/ResourceOptionsForm.Designer.cs +++ b/Source/Core/Windows/ResourceOptionsForm.Designer.cs @@ -51,7 +51,6 @@ namespace CodeImp.DoomBuilder.Windows this.cancel = new System.Windows.Forms.Button(); this.apply = new System.Windows.Forms.Button(); this.wadfiledialog = new System.Windows.Forms.OpenFileDialog(); - this.dirdialog = new System.Windows.Forms.FolderBrowserDialog(); this.pk3filedialog = new System.Windows.Forms.OpenFileDialog(); this.notfortesting = new System.Windows.Forms.CheckBox(); label1 = new System.Windows.Forms.Label(); @@ -306,10 +305,6 @@ namespace CodeImp.DoomBuilder.Windows this.wadfiledialog.Filter = "WAD Files (*.wad;*.srb)|*.wad;*.srb|Kart files (*.kart)|*.kart|TopDown Files (*.td)|*.td|All Files|*"; this.wadfiledialog.Title = "Browse WAD File"; // - // dirdialog - // - this.dirdialog.Description = "Please select a directory from which to load images when editing your map..."; - // // pk3filedialog // this.pk3filedialog.Filter = "Doom PK3/PK7 Files (*.pk3;*.pk7)|*.pk3;*.pk7"; @@ -373,7 +368,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.CheckBox dir_flats; private System.Windows.Forms.CheckBox dir_textures; private System.Windows.Forms.OpenFileDialog wadfiledialog; - private System.Windows.Forms.FolderBrowserDialog dirdialog; private System.Windows.Forms.TabPage pk3filetab; private System.Windows.Forms.Button browsepk3; private System.Windows.Forms.TextBox pk3location; diff --git a/Source/Core/Windows/ResourceOptionsForm.cs b/Source/Core/Windows/ResourceOptionsForm.cs index 20f579e..b064a95 100644 --- a/Source/Core/Windows/ResourceOptionsForm.cs +++ b/Source/Core/Windows/ResourceOptionsForm.cs @@ -29,9 +29,11 @@ namespace CodeImp.DoomBuilder.Windows { // Variables private DataLocation res; - - // Properties - public DataLocation ResourceLocation { get { return res; } } + private string startPath; + private Controls.FolderSelectDialog dirdialog; + + // Properties + public DataLocation ResourceLocation { get { return res; } } // Constructor public ResourceOptionsForm(DataLocation settings, string caption, string startPath) //mxd. added startPath @@ -71,12 +73,7 @@ namespace CodeImp.DoomBuilder.Windows // Checkbox notfortesting.Checked = res.notfortesting; - //mxd - if(!string.IsNullOrEmpty(startPath)) - { - string startDir = Path.GetDirectoryName(startPath); - if(Directory.Exists(startDir)) dirdialog.SelectedPath = startDir; - } + this.startPath = startPath; } // OK clicked @@ -184,11 +181,29 @@ namespace CodeImp.DoomBuilder.Windows // Browse Directory clicked private void browsedir_Click(object sender, EventArgs e) { - // Browse for Directory - if(dirdialog.ShowDialog(this) == DialogResult.OK) + // Browse for Directory + dirdialog = new Controls.FolderSelectDialog(); + dirdialog.Title = "Select Resource Folder"; + + if (string.IsNullOrEmpty(dirlocation.Text) || !Directory.Exists(dirlocation.Text)) + { + //mxd + if (!string.IsNullOrEmpty(startPath)) + { + string startDir = Path.GetDirectoryName(startPath); + if (Directory.Exists(startDir)) dirdialog.InitialDirectory = startDir + '\\'; + } + } + else + { + dirdialog.InitialDirectory = dirlocation.Text; + } + + if (dirdialog.ShowDialog(this.Handle)) { - // Use this directory - dirlocation.Text = dirdialog.SelectedPath; + // Use this directory + dirlocation.Text = dirdialog.FileName; + dirdialog = null; } } diff --git a/Source/Core/Windows/ResourceOptionsForm.resx b/Source/Core/Windows/ResourceOptionsForm.resx index cafe2e9..66cd90c 100644 --- a/Source/Core/Windows/ResourceOptionsForm.resx +++ b/Source/Core/Windows/ResourceOptionsForm.resx @@ -171,9 +171,6 @@ 17, 17 - - 133, 17 - 227, 17