From bec1acf6c9fc9fef7aad5c35a6cfb20e2dcdb39c Mon Sep 17 00:00:00 2001 From: codeimp Date: Mon, 20 Jul 2009 15:16:40 +0000 Subject: [PATCH] @ work in progress on dockers --- Source/Core/Builder.csproj | 1 + Source/Core/Config/ProgramConfiguration.cs | 4 + Source/Core/Controls/Docker.cs | 82 +++++++++ .../Core/Controls/DockersControl.Designer.cs | 35 ++++ Source/Core/Controls/DockersControl.cs | 139 +++++++++++++- Source/Core/Windows/MainForm.Designer.cs | 174 +++++++++--------- Source/Core/Windows/MainForm.cs | 43 +++-- 7 files changed, 372 insertions(+), 106 deletions(-) create mode 100644 Source/Core/Controls/Docker.cs diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index 807586bd..2e4df283 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -663,6 +663,7 @@ + UserControl diff --git a/Source/Core/Config/ProgramConfiguration.cs b/Source/Core/Config/ProgramConfiguration.cs index ce5e292a..760622e9 100644 --- a/Source/Core/Config/ProgramConfiguration.cs +++ b/Source/Core/Config/ProgramConfiguration.cs @@ -81,6 +81,7 @@ namespace CodeImp.DoomBuilder.Config private PasteOptions pasteoptions; private int dockersposition; private bool collapsedockers; + private int dockerswidth; // These are not stored in the configuration, only used at runtime private string defaulttexture; @@ -131,6 +132,7 @@ namespace CodeImp.DoomBuilder.Config internal PasteOptions PasteOptions { get { return pasteoptions; } set { pasteoptions = value; } } public int DockersPosition { get { return dockersposition; } internal set { dockersposition = value; } } public bool CollapseDockers { get { return collapsedockers; } internal set { collapsedockers = value; } } + public int DockersWidth { get { return dockerswidth; } internal set { dockerswidth = value; } } public string DefaultTexture { get { return defaulttexture; } set { defaulttexture = value; } } public string DefaultFloorTexture { get { return defaultfloortexture; } set { defaultfloortexture = value; } } @@ -197,6 +199,7 @@ namespace CodeImp.DoomBuilder.Config previousversion = cfg.ReadSetting("currentversion", 0); dockersposition = cfg.ReadSetting("dockersposition", 1); collapsedockers = cfg.ReadSetting("collapsedockers", true); + dockerswidth = cfg.ReadSetting("dockerswidth", 300); pasteoptions.ReadConfiguration(cfg, "pasteoptions"); // Success @@ -246,6 +249,7 @@ namespace CodeImp.DoomBuilder.Config cfg.WriteSetting("currentversion", v.Major * 1000000 + v.Revision); cfg.WriteSetting("dockersposition", dockersposition); cfg.WriteSetting("collapsedockers", collapsedockers); + cfg.WriteSetting("dockerswidth", dockerswidth); pasteoptions.WriteConfiguration(cfg, "pasteoptions"); // Save settings configuration diff --git a/Source/Core/Controls/Docker.cs b/Source/Core/Controls/Docker.cs new file mode 100644 index 00000000..d71ed16a --- /dev/null +++ b/Source/Core/Controls/Docker.cs @@ -0,0 +1,82 @@ + +#region ================== Copyright (c) 2007 Pascal vd Heiden + +/* + * Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com + * This program is released under GNU General Public License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#endregion + +#region ================== Namespaces + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using Microsoft.Win32; +using System.Diagnostics; +using CodeImp.DoomBuilder.Actions; +using CodeImp.DoomBuilder.Data; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Rendering; +using System.Drawing.Imaging; +using System.Drawing.Drawing2D; +using SlimDX.Direct3D9; +using SlimDX; + +#endregion + +namespace CodeImp.DoomBuilder.Controls +{ + public class Docker + { + #region ================== Variables + + private string shortname; + private string fullname; + private string title; + private Panel panel; + + #endregion + + #region ================== Variables + + public string Name { get { return shortname; } } + internal string FullName { get { return fullname; } } + public string Title { get { return title; } } + public Panel Panel { get { return panel; } } + + #endregion + + #region ================== Constructor + + // Constructor + public Docker(string name, string title, Panel panel) + { + this.shortname = name; + this.title = title; + this.panel = panel; + } + + #endregion + + #region ================== Methods + + // This makes the full name + internal void MakeFullName(string prefix) + { + fullname = prefix + "_" + shortname; + } + + #endregion + } +} diff --git a/Source/Core/Controls/DockersControl.Designer.cs b/Source/Core/Controls/DockersControl.Designer.cs index 443bc883..8ab95fcb 100644 --- a/Source/Core/Controls/DockersControl.Designer.cs +++ b/Source/Core/Controls/DockersControl.Designer.cs @@ -29,12 +29,19 @@ private void InitializeComponent() { this.tabs = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabPage3 = new System.Windows.Forms.TabPage(); this.splitter = new CodeImp.DoomBuilder.Controls.TransparentPanel(); + this.tabs.SuspendLayout(); this.SuspendLayout(); // // tabs // this.tabs.Alignment = System.Windows.Forms.TabAlignment.Left; + this.tabs.Controls.Add(this.tabPage1); + this.tabs.Controls.Add(this.tabPage2); + this.tabs.Controls.Add(this.tabPage3); this.tabs.Dock = System.Windows.Forms.DockStyle.Fill; this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabs.Location = new System.Drawing.Point(0, 0); @@ -45,6 +52,30 @@ this.tabs.Size = new System.Drawing.Size(308, 541); this.tabs.TabIndex = 0; // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(27, 4); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Size = new System.Drawing.Size(277, 533); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Undo / Redo"; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(27, 4); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Size = new System.Drawing.Size(277, 533); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Clipboard"; + // + // tabPage3 + // + this.tabPage3.Location = new System.Drawing.Point(27, 4); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Size = new System.Drawing.Size(277, 533); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "Prefabs"; + // // splitter // this.splitter.Cursor = System.Windows.Forms.Cursors.SizeWE; @@ -63,6 +94,7 @@ this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Name = "DockersControl"; this.Size = new System.Drawing.Size(308, 541); + this.tabs.ResumeLayout(false); this.ResumeLayout(false); } @@ -71,5 +103,8 @@ private System.Windows.Forms.TabControl tabs; private TransparentPanel splitter; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TabPage tabPage3; } } diff --git a/Source/Core/Controls/DockersControl.cs b/Source/Core/Controls/DockersControl.cs index 8e752ba2..085d6697 100644 --- a/Source/Core/Controls/DockersControl.cs +++ b/Source/Core/Controls/DockersControl.cs @@ -41,29 +41,152 @@ namespace CodeImp.DoomBuilder.Controls internal partial class DockersControl : UserControl { #region ================== Constants - + #endregion - + #region ================== Variables - + + private bool rightalign; + private bool collapsed; + private bool autocollapse; + + private int expandedwidth; // width when expanded + private int expandedtab; // selected tab index when expanded + #endregion + #region ================== Properties + + public bool IsCollpased { get { return collapsed; } } + public bool AutoCollpase { get { return autocollapse; } set { autocollapse = value; } } + + #endregion + #region ================== Constructor // Constructor public DockersControl() { InitializeComponent(); + expandedwidth = (int)((float)this.Width * (this.CurrentAutoScaleDimensions.Width / this.AutoScaleDimensions.Width)); } - + #endregion - + #region ================== Methods - + + // This sets up the controls for left or right alignment + public void Setup(bool right) + { + rightalign = right; + if(rightalign) + { + splitter.Dock = DockStyle.Left; + tabs.Alignment = TabAlignment.Right; + } + else + { + splitter.Dock = DockStyle.Right; + tabs.Alignment = TabAlignment.Left; + } + + tabs.SendToBack(); + } + + // This collapses the docker + public void Collapse() + { + if(collapsed) return; + + splitter.Visible = false; + expandedtab = tabs.SelectedIndex; + expandedwidth = this.Width; + tabs.SelectedIndex = -1; + General.LockWindowUpdate(Parent.Handle); + if(rightalign) this.Left = this.Right - GetCollapsedWidth(); + this.Width = GetCollapsedWidth(); + General.LockWindowUpdate(IntPtr.Zero); + + collapsed = true; + } + + // This expands the docker + public void Expand() + { + if(!collapsed) return; + + splitter.Visible = true; + General.LockWindowUpdate(Parent.Handle); + if(rightalign) this.Left = this.Right - expandedwidth; + this.Width = expandedwidth; + General.LockWindowUpdate(IntPtr.Zero); + tabs.SelectedIndex = expandedtab; + tabs.Invalidate(); + + collapsed = false; + } + + // This calculates the collapsed width + public int GetCollapsedWidth() + { + // Downside of this function is that we need a tab :\ + Rectangle r = tabs.GetTabRect(0); + return r.Width + (int)(2.0f * (this.CurrentAutoScaleDimensions.Width / this.AutoScaleDimensions.Width)); + } + + // This adds a docker + public void Add(Docker d) + { + TabPage page = new TabPage(d.Title); + page.Font = this.Font; + page.Tag = d; + page.Controls.Add(d.Panel); + tabs.TabPages.Add(page); + } + + // This removes a docker + public bool Remove(Docker d) + { + foreach(TabPage page in tabs.TabPages) + { + if((page.Tag as Docker) == d) + { + page.Controls.Clear(); + tabs.TabPages.Remove(page); + return true; + } + } + + return false; + } + + // This sorts tabs by their full name + public void SortTabs(IEnumerable fullnames) + { + Dictionary pages = new Dictionary(tabs.TabPages.Count); + foreach(TabPage p in tabs.TabPages) pages.Add((p.Tag as Docker).FullName, p); + tabs.TabPages.Clear(); + + // Add tabs in order as in fullnames + foreach(string name in fullnames) + { + if(pages.ContainsKey(name)) + { + tabs.TabPages.Add(pages[name]); + pages.Remove(name); + } + } + + // Add remaining tabs + foreach(KeyValuePair p in pages) + tabs.TabPages.Add(p.Value); + } + #endregion - + #region ================== Events - + + #endregion } } diff --git a/Source/Core/Windows/MainForm.Designer.cs b/Source/Core/Windows/MainForm.Designer.cs index 3565ab60..5be11036 100644 --- a/Source/Core/Windows/MainForm.Designer.cs +++ b/Source/Core/Windows/MainForm.Designer.cs @@ -201,13 +201,13 @@ namespace CodeImp.DoomBuilder.Windows // toolStripMenuItem1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); toolStripMenuItem1.Name = "toolStripMenuItem1"; - toolStripMenuItem1.Size = new System.Drawing.Size(198, 6); + toolStripMenuItem1.Size = new System.Drawing.Size(199, 6); // // toolStripMenuItem3 // toolStripMenuItem3.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); toolStripMenuItem3.Name = "toolStripMenuItem3"; - toolStripMenuItem3.Size = new System.Drawing.Size(198, 6); + toolStripMenuItem3.Size = new System.Drawing.Size(199, 6); // // toolStripSeparator1 // @@ -237,7 +237,7 @@ namespace CodeImp.DoomBuilder.Windows // toolStripSeparator11.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); toolStripSeparator11.Name = "toolStripSeparator11"; - toolStripSeparator11.Size = new System.Drawing.Size(162, 6); + toolStripSeparator11.Size = new System.Drawing.Size(160, 6); // // toolstripSeperator1 // @@ -249,7 +249,7 @@ namespace CodeImp.DoomBuilder.Windows // toolstripSeperator6.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); toolstripSeperator6.Name = "toolstripSeperator6"; - toolstripSeperator6.Size = new System.Drawing.Size(162, 6); + toolstripSeperator6.Size = new System.Drawing.Size(160, 6); // // toolStripSeparator7 // @@ -272,12 +272,12 @@ namespace CodeImp.DoomBuilder.Windows // toolStripMenuItem4 // toolStripMenuItem4.Name = "toolStripMenuItem4"; - toolStripMenuItem4.Size = new System.Drawing.Size(161, 6); + toolStripMenuItem4.Size = new System.Drawing.Size(150, 6); // // toolStripSeparator2 // toolStripSeparator2.Name = "toolStripSeparator2"; - toolStripSeparator2.Size = new System.Drawing.Size(164, 6); + toolStripSeparator2.Size = new System.Drawing.Size(153, 6); // // buttoneditmodesseperator // @@ -323,7 +323,7 @@ namespace CodeImp.DoomBuilder.Windows toolStripMenuItem3, this.itemexit}); this.menufile.Name = "menufile"; - this.menufile.Size = new System.Drawing.Size(35, 20); + this.menufile.Size = new System.Drawing.Size(37, 20); this.menufile.Text = "File"; // // itemnewmap @@ -331,7 +331,7 @@ namespace CodeImp.DoomBuilder.Windows this.itemnewmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.File; this.itemnewmap.Name = "itemnewmap"; this.itemnewmap.ShortcutKeyDisplayString = ""; - this.itemnewmap.Size = new System.Drawing.Size(201, 22); + this.itemnewmap.Size = new System.Drawing.Size(202, 22); this.itemnewmap.Tag = "builder_newmap"; this.itemnewmap.Text = "New Map"; this.itemnewmap.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -340,7 +340,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemopenmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.OpenMap; this.itemopenmap.Name = "itemopenmap"; - this.itemopenmap.Size = new System.Drawing.Size(201, 22); + this.itemopenmap.Size = new System.Drawing.Size(202, 22); this.itemopenmap.Tag = "builder_openmap"; this.itemopenmap.Text = "Open Map..."; this.itemopenmap.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -348,7 +348,7 @@ namespace CodeImp.DoomBuilder.Windows // itemclosemap // this.itemclosemap.Name = "itemclosemap"; - this.itemclosemap.Size = new System.Drawing.Size(201, 22); + this.itemclosemap.Size = new System.Drawing.Size(202, 22); this.itemclosemap.Tag = "builder_closemap"; this.itemclosemap.Text = "Close Map"; this.itemclosemap.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -357,7 +357,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemsavemap.Image = global::CodeImp.DoomBuilder.Properties.Resources.SaveMap; this.itemsavemap.Name = "itemsavemap"; - this.itemsavemap.Size = new System.Drawing.Size(201, 22); + this.itemsavemap.Size = new System.Drawing.Size(202, 22); this.itemsavemap.Tag = "builder_savemap"; this.itemsavemap.Text = "Save Map"; this.itemsavemap.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -365,7 +365,7 @@ namespace CodeImp.DoomBuilder.Windows // itemsavemapas // this.itemsavemapas.Name = "itemsavemapas"; - this.itemsavemapas.Size = new System.Drawing.Size(201, 22); + this.itemsavemapas.Size = new System.Drawing.Size(202, 22); this.itemsavemapas.Tag = "builder_savemapas"; this.itemsavemapas.Text = "Save Map As..."; this.itemsavemapas.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -373,7 +373,7 @@ namespace CodeImp.DoomBuilder.Windows // itemsavemapinto // this.itemsavemapinto.Name = "itemsavemapinto"; - this.itemsavemapinto.Size = new System.Drawing.Size(201, 22); + this.itemsavemapinto.Size = new System.Drawing.Size(202, 22); this.itemsavemapinto.Tag = "builder_savemapinto"; this.itemsavemapinto.Text = "Save Map Into..."; this.itemsavemapinto.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -382,19 +382,19 @@ namespace CodeImp.DoomBuilder.Windows // this.toolStripMenuItem5.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.toolStripMenuItem5.Name = "toolStripMenuItem5"; - this.toolStripMenuItem5.Size = new System.Drawing.Size(198, 6); + this.toolStripMenuItem5.Size = new System.Drawing.Size(199, 6); // // itemnorecent // this.itemnorecent.Enabled = false; this.itemnorecent.Name = "itemnorecent"; - this.itemnorecent.Size = new System.Drawing.Size(201, 22); + this.itemnorecent.Size = new System.Drawing.Size(202, 22); this.itemnorecent.Text = "No recently opened files"; // // itemexit // this.itemexit.Name = "itemexit"; - this.itemexit.Size = new System.Drawing.Size(201, 22); + this.itemexit.Size = new System.Drawing.Size(202, 22); this.itemexit.Text = "Exit"; this.itemexit.Click += new System.EventHandler(this.itemexit_Click); // @@ -418,14 +418,14 @@ namespace CodeImp.DoomBuilder.Windows toolStripSeparator11, this.itemmapoptions}); this.menuedit.Name = "menuedit"; - this.menuedit.Size = new System.Drawing.Size(37, 20); + this.menuedit.Size = new System.Drawing.Size(39, 20); this.menuedit.Text = "Edit"; // // itemundo // this.itemundo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Undo; this.itemundo.Name = "itemundo"; - this.itemundo.Size = new System.Drawing.Size(165, 22); + this.itemundo.Size = new System.Drawing.Size(163, 22); this.itemundo.Tag = "builder_undo"; this.itemundo.Text = "Undo"; this.itemundo.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -434,7 +434,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemredo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Redo; this.itemredo.Name = "itemredo"; - this.itemredo.Size = new System.Drawing.Size(165, 22); + this.itemredo.Size = new System.Drawing.Size(163, 22); this.itemredo.Tag = "builder_redo"; this.itemredo.Text = "Redo"; this.itemredo.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -443,13 +443,13 @@ namespace CodeImp.DoomBuilder.Windows // this.toolStripMenuItem7.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.toolStripMenuItem7.Name = "toolStripMenuItem7"; - this.toolStripMenuItem7.Size = new System.Drawing.Size(162, 6); + this.toolStripMenuItem7.Size = new System.Drawing.Size(160, 6); // // itemcut // this.itemcut.Image = global::CodeImp.DoomBuilder.Properties.Resources.Cut; this.itemcut.Name = "itemcut"; - this.itemcut.Size = new System.Drawing.Size(165, 22); + this.itemcut.Size = new System.Drawing.Size(163, 22); this.itemcut.Tag = "builder_cutselection"; this.itemcut.Text = "Cut"; this.itemcut.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -458,7 +458,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemcopy.Image = global::CodeImp.DoomBuilder.Properties.Resources.Copy; this.itemcopy.Name = "itemcopy"; - this.itemcopy.Size = new System.Drawing.Size(165, 22); + this.itemcopy.Size = new System.Drawing.Size(163, 22); this.itemcopy.Tag = "builder_copyselection"; this.itemcopy.Text = "Copy"; this.itemcopy.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -467,7 +467,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itempaste.Image = global::CodeImp.DoomBuilder.Properties.Resources.Paste; this.itempaste.Name = "itempaste"; - this.itempaste.Size = new System.Drawing.Size(165, 22); + this.itempaste.Size = new System.Drawing.Size(163, 22); this.itempaste.Tag = "builder_pasteselection"; this.itempaste.Text = "Paste"; this.itempaste.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -476,7 +476,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itempastespecial.Image = global::CodeImp.DoomBuilder.Properties.Resources.PasteSpecial; this.itempastespecial.Name = "itempastespecial"; - this.itempastespecial.Size = new System.Drawing.Size(165, 22); + this.itempastespecial.Size = new System.Drawing.Size(163, 22); this.itempastespecial.Tag = "builder_pasteselectionspecial"; this.itempastespecial.Text = "Paste Special..."; this.itempastespecial.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -487,7 +487,7 @@ namespace CodeImp.DoomBuilder.Windows this.itemsnaptogrid.CheckState = System.Windows.Forms.CheckState.Checked; this.itemsnaptogrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid4; this.itemsnaptogrid.Name = "itemsnaptogrid"; - this.itemsnaptogrid.Size = new System.Drawing.Size(165, 22); + this.itemsnaptogrid.Size = new System.Drawing.Size(163, 22); this.itemsnaptogrid.Tag = "builder_togglesnap"; this.itemsnaptogrid.Text = "Snap to Grid"; this.itemsnaptogrid.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -498,7 +498,7 @@ namespace CodeImp.DoomBuilder.Windows this.itemautomerge.CheckState = System.Windows.Forms.CheckState.Checked; this.itemautomerge.Image = global::CodeImp.DoomBuilder.Properties.Resources.mergegeometry2; this.itemautomerge.Name = "itemautomerge"; - this.itemautomerge.Size = new System.Drawing.Size(165, 22); + this.itemautomerge.Size = new System.Drawing.Size(163, 22); this.itemautomerge.Tag = "builder_toggleautomerge"; this.itemautomerge.Text = "Merge Geometry"; this.itemautomerge.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -507,12 +507,12 @@ namespace CodeImp.DoomBuilder.Windows // this.toolStripMenuItem6.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.toolStripMenuItem6.Name = "toolStripMenuItem6"; - this.toolStripMenuItem6.Size = new System.Drawing.Size(162, 6); + this.toolStripMenuItem6.Size = new System.Drawing.Size(160, 6); // // itemgridinc // this.itemgridinc.Name = "itemgridinc"; - this.itemgridinc.Size = new System.Drawing.Size(165, 22); + this.itemgridinc.Size = new System.Drawing.Size(163, 22); this.itemgridinc.Tag = "builder_griddec"; this.itemgridinc.Text = "Increase Grid"; this.itemgridinc.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -520,7 +520,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgriddec // this.itemgriddec.Name = "itemgriddec"; - this.itemgriddec.Size = new System.Drawing.Size(165, 22); + this.itemgriddec.Size = new System.Drawing.Size(163, 22); this.itemgriddec.Tag = "builder_gridinc"; this.itemgriddec.Text = "Decrease Grid"; this.itemgriddec.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -529,7 +529,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemgridsetup.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid2; this.itemgridsetup.Name = "itemgridsetup"; - this.itemgridsetup.Size = new System.Drawing.Size(165, 22); + this.itemgridsetup.Size = new System.Drawing.Size(163, 22); this.itemgridsetup.Tag = "builder_gridsetup"; this.itemgridsetup.Text = "Grid Setup..."; this.itemgridsetup.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -538,7 +538,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemmapoptions.Image = global::CodeImp.DoomBuilder.Properties.Resources.Properties; this.itemmapoptions.Name = "itemmapoptions"; - this.itemmapoptions.Size = new System.Drawing.Size(165, 22); + this.itemmapoptions.Size = new System.Drawing.Size(163, 22); this.itemmapoptions.Tag = "builder_mapoptions"; this.itemmapoptions.Text = "Map Options...."; this.itemmapoptions.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -559,14 +559,14 @@ namespace CodeImp.DoomBuilder.Windows this.toolStripMenuItem10, this.itemscripteditor}); this.menuview.Name = "menuview"; - this.menuview.Size = new System.Drawing.Size(41, 20); + this.menuview.Size = new System.Drawing.Size(44, 20); this.menuview.Text = "View"; // // itemthingsfilter // this.itemthingsfilter.Image = global::CodeImp.DoomBuilder.Properties.Resources.Filter; this.itemthingsfilter.Name = "itemthingsfilter"; - this.itemthingsfilter.Size = new System.Drawing.Size(210, 22); + this.itemthingsfilter.Size = new System.Drawing.Size(209, 22); this.itemthingsfilter.Tag = "builder_thingsfilterssetup"; this.itemthingsfilter.Text = "Configure Things Filters..."; this.itemthingsfilter.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -575,13 +575,13 @@ namespace CodeImp.DoomBuilder.Windows // this.toolStripMenuItem9.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.toolStripMenuItem9.Name = "toolStripMenuItem9"; - this.toolStripMenuItem9.Size = new System.Drawing.Size(207, 6); + this.toolStripMenuItem9.Size = new System.Drawing.Size(206, 6); // // itemviewnormal // this.itemviewnormal.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewNormal; this.itemviewnormal.Name = "itemviewnormal"; - this.itemviewnormal.Size = new System.Drawing.Size(210, 22); + this.itemviewnormal.Size = new System.Drawing.Size(209, 22); this.itemviewnormal.Tag = "builder_viewmodenormal"; this.itemviewnormal.Text = "Wireframe"; this.itemviewnormal.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -590,7 +590,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemviewbrightness.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewBrightness; this.itemviewbrightness.Name = "itemviewbrightness"; - this.itemviewbrightness.Size = new System.Drawing.Size(210, 22); + this.itemviewbrightness.Size = new System.Drawing.Size(209, 22); this.itemviewbrightness.Tag = "builder_viewmodebrightness"; this.itemviewbrightness.Text = "Brightness Levels"; this.itemviewbrightness.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -599,7 +599,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemviewfloors.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewTextureFloor; this.itemviewfloors.Name = "itemviewfloors"; - this.itemviewfloors.Size = new System.Drawing.Size(210, 22); + this.itemviewfloors.Size = new System.Drawing.Size(209, 22); this.itemviewfloors.Tag = "builder_viewmodefloors"; this.itemviewfloors.Text = "Floor Textures"; this.itemviewfloors.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -608,7 +608,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemviewceilings.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewTextureCeiling; this.itemviewceilings.Name = "itemviewceilings"; - this.itemviewceilings.Size = new System.Drawing.Size(210, 22); + this.itemviewceilings.Size = new System.Drawing.Size(209, 22); this.itemviewceilings.Tag = "builder_viewmodeceilings"; this.itemviewceilings.Text = "Ceiling Textures"; this.itemviewceilings.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -616,7 +616,7 @@ namespace CodeImp.DoomBuilder.Windows // toolStripMenuItem2 // this.toolStripMenuItem2.Name = "toolStripMenuItem2"; - this.toolStripMenuItem2.Size = new System.Drawing.Size(207, 6); + this.toolStripMenuItem2.Size = new System.Drawing.Size(206, 6); // // menuzoom // @@ -629,13 +629,13 @@ namespace CodeImp.DoomBuilder.Windows this.item2zoom5}); this.menuzoom.Image = global::CodeImp.DoomBuilder.Properties.Resources.Zoom; this.menuzoom.Name = "menuzoom"; - this.menuzoom.Size = new System.Drawing.Size(210, 22); + this.menuzoom.Size = new System.Drawing.Size(209, 22); this.menuzoom.Text = "Zoom"; // // item2zoom200 // this.item2zoom200.Name = "item2zoom200"; - this.item2zoom200.Size = new System.Drawing.Size(114, 22); + this.item2zoom200.Size = new System.Drawing.Size(102, 22); this.item2zoom200.Tag = "200"; this.item2zoom200.Text = "200%"; this.item2zoom200.Click += new System.EventHandler(this.itemzoomto_Click); @@ -643,7 +643,7 @@ namespace CodeImp.DoomBuilder.Windows // item2zoom100 // this.item2zoom100.Name = "item2zoom100"; - this.item2zoom100.Size = new System.Drawing.Size(114, 22); + this.item2zoom100.Size = new System.Drawing.Size(102, 22); this.item2zoom100.Tag = "100"; this.item2zoom100.Text = "100%"; this.item2zoom100.Click += new System.EventHandler(this.itemzoomto_Click); @@ -651,7 +651,7 @@ namespace CodeImp.DoomBuilder.Windows // item2zoom50 // this.item2zoom50.Name = "item2zoom50"; - this.item2zoom50.Size = new System.Drawing.Size(114, 22); + this.item2zoom50.Size = new System.Drawing.Size(102, 22); this.item2zoom50.Tag = "50"; this.item2zoom50.Text = "50%"; this.item2zoom50.Click += new System.EventHandler(this.itemzoomto_Click); @@ -659,7 +659,7 @@ namespace CodeImp.DoomBuilder.Windows // item2zoom25 // this.item2zoom25.Name = "item2zoom25"; - this.item2zoom25.Size = new System.Drawing.Size(114, 22); + this.item2zoom25.Size = new System.Drawing.Size(102, 22); this.item2zoom25.Tag = "25"; this.item2zoom25.Text = "25%"; this.item2zoom25.Click += new System.EventHandler(this.itemzoomto_Click); @@ -667,7 +667,7 @@ namespace CodeImp.DoomBuilder.Windows // item2zoom10 // this.item2zoom10.Name = "item2zoom10"; - this.item2zoom10.Size = new System.Drawing.Size(114, 22); + this.item2zoom10.Size = new System.Drawing.Size(102, 22); this.item2zoom10.Tag = "10"; this.item2zoom10.Text = "10%"; this.item2zoom10.Click += new System.EventHandler(this.itemzoomto_Click); @@ -675,7 +675,7 @@ namespace CodeImp.DoomBuilder.Windows // item2zoom5 // this.item2zoom5.Name = "item2zoom5"; - this.item2zoom5.Size = new System.Drawing.Size(114, 22); + this.item2zoom5.Size = new System.Drawing.Size(102, 22); this.item2zoom5.Tag = "5"; this.item2zoom5.Text = "5%"; this.item2zoom5.Click += new System.EventHandler(this.itemzoomto_Click); @@ -683,7 +683,7 @@ namespace CodeImp.DoomBuilder.Windows // itemfittoscreen // this.itemfittoscreen.Name = "itemfittoscreen"; - this.itemfittoscreen.Size = new System.Drawing.Size(210, 22); + this.itemfittoscreen.Size = new System.Drawing.Size(209, 22); this.itemfittoscreen.Tag = "builder_centerinscreen"; this.itemfittoscreen.Text = "Fit to screen"; this.itemfittoscreen.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -691,7 +691,7 @@ namespace CodeImp.DoomBuilder.Windows // itemtoggleinfo // this.itemtoggleinfo.Name = "itemtoggleinfo"; - this.itemtoggleinfo.Size = new System.Drawing.Size(210, 22); + this.itemtoggleinfo.Size = new System.Drawing.Size(209, 22); this.itemtoggleinfo.Tag = "builder_toggleinfopanel"; this.itemtoggleinfo.Text = "Expanded Info Panel"; this.itemtoggleinfo.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -700,13 +700,13 @@ namespace CodeImp.DoomBuilder.Windows // this.toolStripMenuItem10.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.toolStripMenuItem10.Name = "toolStripMenuItem10"; - this.toolStripMenuItem10.Size = new System.Drawing.Size(207, 6); + this.toolStripMenuItem10.Size = new System.Drawing.Size(206, 6); // // itemscripteditor // this.itemscripteditor.Image = global::CodeImp.DoomBuilder.Properties.Resources.Script2; this.itemscripteditor.Name = "itemscripteditor"; - this.itemscripteditor.Size = new System.Drawing.Size(210, 22); + this.itemscripteditor.Size = new System.Drawing.Size(209, 22); this.itemscripteditor.Tag = "builder_openscripteditor"; this.itemscripteditor.Text = "Script Editor..."; this.itemscripteditor.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -714,7 +714,7 @@ namespace CodeImp.DoomBuilder.Windows // menumode // this.menumode.Name = "menumode"; - this.menumode.Size = new System.Drawing.Size(45, 20); + this.menumode.Size = new System.Drawing.Size(50, 20); this.menumode.Text = "Mode"; // // menuprefabs @@ -725,13 +725,13 @@ namespace CodeImp.DoomBuilder.Windows this.toolStripMenuItem12, this.itemcreateprefab}); this.menuprefabs.Name = "menuprefabs"; - this.menuprefabs.Size = new System.Drawing.Size(56, 20); + this.menuprefabs.Size = new System.Drawing.Size(58, 20); this.menuprefabs.Text = "Prefabs"; // // iteminsertprefabfile // this.iteminsertprefabfile.Name = "iteminsertprefabfile"; - this.iteminsertprefabfile.Size = new System.Drawing.Size(205, 22); + this.iteminsertprefabfile.Size = new System.Drawing.Size(199, 22); this.iteminsertprefabfile.Tag = "builder_insertprefabfile"; this.iteminsertprefabfile.Text = "Insert Prefab from File..."; this.iteminsertprefabfile.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -739,7 +739,7 @@ namespace CodeImp.DoomBuilder.Windows // iteminsertpreviousprefab // this.iteminsertpreviousprefab.Name = "iteminsertpreviousprefab"; - this.iteminsertpreviousprefab.Size = new System.Drawing.Size(205, 22); + this.iteminsertpreviousprefab.Size = new System.Drawing.Size(199, 22); this.iteminsertpreviousprefab.Tag = "builder_insertpreviousprefab"; this.iteminsertpreviousprefab.Text = "Insert Previous Prefab"; this.iteminsertpreviousprefab.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -748,12 +748,12 @@ namespace CodeImp.DoomBuilder.Windows // this.toolStripMenuItem12.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.toolStripMenuItem12.Name = "toolStripMenuItem12"; - this.toolStripMenuItem12.Size = new System.Drawing.Size(202, 6); + this.toolStripMenuItem12.Size = new System.Drawing.Size(196, 6); // // itemcreateprefab // this.itemcreateprefab.Name = "itemcreateprefab"; - this.itemcreateprefab.Size = new System.Drawing.Size(205, 22); + this.itemcreateprefab.Size = new System.Drawing.Size(199, 22); this.itemcreateprefab.Tag = "builder_createprefab"; this.itemcreateprefab.Text = "Create From Selection..."; this.itemcreateprefab.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -769,13 +769,13 @@ namespace CodeImp.DoomBuilder.Windows this.toolStripMenuItem11, this.itemtestmap}); this.menutools.Name = "menutools"; - this.menutools.Size = new System.Drawing.Size(44, 20); + this.menutools.Size = new System.Drawing.Size(48, 20); this.menutools.Text = "Tools"; // // itemreloadresources // this.itemreloadresources.Name = "itemreloadresources"; - this.itemreloadresources.Size = new System.Drawing.Size(197, 22); + this.itemreloadresources.Size = new System.Drawing.Size(196, 22); this.itemreloadresources.Tag = "builder_reloadresources"; this.itemreloadresources.Text = "Reload Resources"; this.itemreloadresources.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -784,7 +784,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemshowerrors.Image = global::CodeImp.DoomBuilder.Properties.Resources.Warning; this.itemshowerrors.Name = "itemshowerrors"; - this.itemshowerrors.Size = new System.Drawing.Size(197, 22); + this.itemshowerrors.Size = new System.Drawing.Size(196, 22); this.itemshowerrors.Tag = "builder_showerrors"; this.itemshowerrors.Text = "Errors and Warnings..."; this.itemshowerrors.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -793,12 +793,12 @@ namespace CodeImp.DoomBuilder.Windows // this.toolStripMenuItem8.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.toolStripMenuItem8.Name = "toolStripMenuItem8"; - this.toolStripMenuItem8.Size = new System.Drawing.Size(194, 6); + this.toolStripMenuItem8.Size = new System.Drawing.Size(193, 6); // // configurationToolStripMenuItem // this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem"; - this.configurationToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.configurationToolStripMenuItem.Size = new System.Drawing.Size(196, 22); this.configurationToolStripMenuItem.Tag = "builder_configuration"; this.configurationToolStripMenuItem.Text = "Game Configurations..."; this.configurationToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -806,7 +806,7 @@ namespace CodeImp.DoomBuilder.Windows // preferencesToolStripMenuItem // this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem"; - this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(196, 22); this.preferencesToolStripMenuItem.Tag = "builder_preferences"; this.preferencesToolStripMenuItem.Text = "Preferences..."; this.preferencesToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -815,13 +815,13 @@ namespace CodeImp.DoomBuilder.Windows // this.toolStripMenuItem11.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.toolStripMenuItem11.Name = "toolStripMenuItem11"; - this.toolStripMenuItem11.Size = new System.Drawing.Size(194, 6); + this.toolStripMenuItem11.Size = new System.Drawing.Size(193, 6); // // itemtestmap // this.itemtestmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.Test; this.itemtestmap.Name = "itemtestmap"; - this.itemtestmap.Size = new System.Drawing.Size(197, 22); + this.itemtestmap.Size = new System.Drawing.Size(196, 22); this.itemtestmap.Tag = "builder_testmap"; this.itemtestmap.Text = "Test Map"; this.itemtestmap.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -834,14 +834,14 @@ namespace CodeImp.DoomBuilder.Windows this.toolStripMenuItem13, this.itemhelpabout}); this.menuhelp.Name = "menuhelp"; - this.menuhelp.Size = new System.Drawing.Size(40, 20); + this.menuhelp.Size = new System.Drawing.Size(44, 20); this.menuhelp.Text = "Help"; // // itemhelprefmanual // this.itemhelprefmanual.Image = global::CodeImp.DoomBuilder.Properties.Resources.Help; this.itemhelprefmanual.Name = "itemhelprefmanual"; - this.itemhelprefmanual.Size = new System.Drawing.Size(198, 22); + this.itemhelprefmanual.Size = new System.Drawing.Size(203, 22); this.itemhelprefmanual.Text = "Reference Manual"; this.itemhelprefmanual.Click += new System.EventHandler(this.itemhelprefmanual_Click); // @@ -849,7 +849,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemhelpeditmode.Image = global::CodeImp.DoomBuilder.Properties.Resources.Question; this.itemhelpeditmode.Name = "itemhelpeditmode"; - this.itemhelpeditmode.Size = new System.Drawing.Size(198, 22); + this.itemhelpeditmode.Size = new System.Drawing.Size(203, 22); this.itemhelpeditmode.Text = "About this Editing Mode"; this.itemhelpeditmode.Click += new System.EventHandler(this.itemhelpeditmode_Click); // @@ -857,12 +857,12 @@ namespace CodeImp.DoomBuilder.Windows // this.toolStripMenuItem13.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.toolStripMenuItem13.Name = "toolStripMenuItem13"; - this.toolStripMenuItem13.Size = new System.Drawing.Size(195, 6); + this.toolStripMenuItem13.Size = new System.Drawing.Size(200, 6); // // itemhelpabout // this.itemhelpabout.Name = "itemhelpabout"; - this.itemhelpabout.Size = new System.Drawing.Size(198, 22); + this.itemhelpabout.Size = new System.Drawing.Size(203, 22); this.itemhelpabout.Text = "About Doom Builder..."; this.itemhelpabout.Click += new System.EventHandler(this.itemhelpabout_Click); // @@ -1253,7 +1253,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgrid1024 // this.itemgrid1024.Name = "itemgrid1024"; - this.itemgrid1024.Size = new System.Drawing.Size(164, 22); + this.itemgrid1024.Size = new System.Drawing.Size(153, 22); this.itemgrid1024.Tag = "1024"; this.itemgrid1024.Text = "1024 mp"; this.itemgrid1024.Click += new System.EventHandler(this.itemgridsize_Click); @@ -1261,7 +1261,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgrid512 // this.itemgrid512.Name = "itemgrid512"; - this.itemgrid512.Size = new System.Drawing.Size(164, 22); + this.itemgrid512.Size = new System.Drawing.Size(153, 22); this.itemgrid512.Tag = "512"; this.itemgrid512.Text = "512 mp"; this.itemgrid512.Click += new System.EventHandler(this.itemgridsize_Click); @@ -1269,7 +1269,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgrid256 // this.itemgrid256.Name = "itemgrid256"; - this.itemgrid256.Size = new System.Drawing.Size(164, 22); + this.itemgrid256.Size = new System.Drawing.Size(153, 22); this.itemgrid256.Tag = "256"; this.itemgrid256.Text = "256 mp"; this.itemgrid256.Click += new System.EventHandler(this.itemgridsize_Click); @@ -1277,7 +1277,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgrid128 // this.itemgrid128.Name = "itemgrid128"; - this.itemgrid128.Size = new System.Drawing.Size(164, 22); + this.itemgrid128.Size = new System.Drawing.Size(153, 22); this.itemgrid128.Tag = "128"; this.itemgrid128.Text = "128 mp"; this.itemgrid128.Click += new System.EventHandler(this.itemgridsize_Click); @@ -1285,7 +1285,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgrid64 // this.itemgrid64.Name = "itemgrid64"; - this.itemgrid64.Size = new System.Drawing.Size(164, 22); + this.itemgrid64.Size = new System.Drawing.Size(153, 22); this.itemgrid64.Tag = "64"; this.itemgrid64.Text = "64 mp"; this.itemgrid64.Click += new System.EventHandler(this.itemgridsize_Click); @@ -1293,7 +1293,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgrid32 // this.itemgrid32.Name = "itemgrid32"; - this.itemgrid32.Size = new System.Drawing.Size(164, 22); + this.itemgrid32.Size = new System.Drawing.Size(153, 22); this.itemgrid32.Tag = "32"; this.itemgrid32.Text = "32 mp"; this.itemgrid32.Click += new System.EventHandler(this.itemgridsize_Click); @@ -1301,7 +1301,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgrid16 // this.itemgrid16.Name = "itemgrid16"; - this.itemgrid16.Size = new System.Drawing.Size(164, 22); + this.itemgrid16.Size = new System.Drawing.Size(153, 22); this.itemgrid16.Tag = "16"; this.itemgrid16.Text = "16 mp"; this.itemgrid16.Click += new System.EventHandler(this.itemgridsize_Click); @@ -1309,7 +1309,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgrid8 // this.itemgrid8.Name = "itemgrid8"; - this.itemgrid8.Size = new System.Drawing.Size(164, 22); + this.itemgrid8.Size = new System.Drawing.Size(153, 22); this.itemgrid8.Tag = "8"; this.itemgrid8.Text = "8 mp"; this.itemgrid8.Click += new System.EventHandler(this.itemgridsize_Click); @@ -1317,7 +1317,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgrid4 // this.itemgrid4.Name = "itemgrid4"; - this.itemgrid4.Size = new System.Drawing.Size(164, 22); + this.itemgrid4.Size = new System.Drawing.Size(153, 22); this.itemgrid4.Tag = "4"; this.itemgrid4.Text = "4 mp"; this.itemgrid4.Click += new System.EventHandler(this.itemgridsize_Click); @@ -1325,7 +1325,7 @@ namespace CodeImp.DoomBuilder.Windows // itemgridcustom // this.itemgridcustom.Name = "itemgridcustom"; - this.itemgridcustom.Size = new System.Drawing.Size(164, 22); + this.itemgridcustom.Size = new System.Drawing.Size(153, 22); this.itemgridcustom.Text = "Customize..."; this.itemgridcustom.Click += new System.EventHandler(this.itemgridcustom_Click); // @@ -1364,7 +1364,7 @@ namespace CodeImp.DoomBuilder.Windows // itemzoom200 // this.itemzoom200.Name = "itemzoom200"; - this.itemzoom200.Size = new System.Drawing.Size(167, 22); + this.itemzoom200.Size = new System.Drawing.Size(156, 22); this.itemzoom200.Tag = "200"; this.itemzoom200.Text = "200%"; this.itemzoom200.Click += new System.EventHandler(this.itemzoomto_Click); @@ -1372,7 +1372,7 @@ namespace CodeImp.DoomBuilder.Windows // itemzoom100 // this.itemzoom100.Name = "itemzoom100"; - this.itemzoom100.Size = new System.Drawing.Size(167, 22); + this.itemzoom100.Size = new System.Drawing.Size(156, 22); this.itemzoom100.Tag = "100"; this.itemzoom100.Text = "100%"; this.itemzoom100.Click += new System.EventHandler(this.itemzoomto_Click); @@ -1380,7 +1380,7 @@ namespace CodeImp.DoomBuilder.Windows // itemzoom50 // this.itemzoom50.Name = "itemzoom50"; - this.itemzoom50.Size = new System.Drawing.Size(167, 22); + this.itemzoom50.Size = new System.Drawing.Size(156, 22); this.itemzoom50.Tag = "50"; this.itemzoom50.Text = "50%"; this.itemzoom50.Click += new System.EventHandler(this.itemzoomto_Click); @@ -1388,7 +1388,7 @@ namespace CodeImp.DoomBuilder.Windows // itemzoom25 // this.itemzoom25.Name = "itemzoom25"; - this.itemzoom25.Size = new System.Drawing.Size(167, 22); + this.itemzoom25.Size = new System.Drawing.Size(156, 22); this.itemzoom25.Tag = "25"; this.itemzoom25.Text = "25%"; this.itemzoom25.Click += new System.EventHandler(this.itemzoomto_Click); @@ -1396,7 +1396,7 @@ namespace CodeImp.DoomBuilder.Windows // itemzoom10 // this.itemzoom10.Name = "itemzoom10"; - this.itemzoom10.Size = new System.Drawing.Size(167, 22); + this.itemzoom10.Size = new System.Drawing.Size(156, 22); this.itemzoom10.Tag = "10"; this.itemzoom10.Text = "10%"; this.itemzoom10.Click += new System.EventHandler(this.itemzoomto_Click); @@ -1404,7 +1404,7 @@ namespace CodeImp.DoomBuilder.Windows // itemzoom5 // this.itemzoom5.Name = "itemzoom5"; - this.itemzoom5.Size = new System.Drawing.Size(167, 22); + this.itemzoom5.Size = new System.Drawing.Size(156, 22); this.itemzoom5.Tag = "5"; this.itemzoom5.Text = "5%"; this.itemzoom5.Click += new System.EventHandler(this.itemzoomto_Click); @@ -1412,7 +1412,7 @@ namespace CodeImp.DoomBuilder.Windows // itemzoomfittoscreen // this.itemzoomfittoscreen.Name = "itemzoomfittoscreen"; - this.itemzoomfittoscreen.Size = new System.Drawing.Size(167, 22); + this.itemzoomfittoscreen.Size = new System.Drawing.Size(156, 22); this.itemzoomfittoscreen.Text = "Fit to screen"; this.itemzoomfittoscreen.Click += new System.EventHandler(this.itemzoomfittoscreen_Click); // @@ -1591,12 +1591,12 @@ namespace CodeImp.DoomBuilder.Windows // // dockerspanel // + this.dockerspanel.AutoCollpase = true; this.dockerspanel.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.dockerspanel.Location = new System.Drawing.Point(62, 67); this.dockerspanel.Name = "dockerspanel"; this.dockerspanel.Size = new System.Drawing.Size(236, 467); this.dockerspanel.TabIndex = 7; - this.dockerspanel.Visible = false; // // MainForm // diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index d436d515..70ee1caf 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -181,7 +181,7 @@ namespace CodeImp.DoomBuilder.Windows InitializeComponent(); editmodeitems = new List(); labelcollapsedinfo.Text = ""; - display.Dock = DockStyle.Fill; + display.Dock = DockStyle.Fill; // Fetch pointer windowptr = base.Handle; @@ -264,19 +264,40 @@ namespace CodeImp.DoomBuilder.Windows float scalex = this.CurrentAutoScaleDimensions.Width / this.AutoScaleDimensions.Width; float scaley = this.CurrentAutoScaleDimensions.Height / this.AutoScaleDimensions.Height; - // Remove docker tabs - - // Setup docker space - switch(General.Settings.DockersPosition) - { - case 0: dockersspace.Dock = DockStyle.Left; break; - case 1: dockersspace.Dock = DockStyle.Right; break; - } - + General.LockWindowUpdate(this.Handle); + + // We can't place the docker easily when collapsed + dockerspanel.Expand(); + if(General.Settings.CollapseDockers) dockersspace.Width = (int)((float)DOCKER_TAB_WIDTH * scalex); else - dockersspace.Width = 300; + dockersspace.Width = General.Settings.DockersWidth; + + // Setup docker + if(General.Settings.DockersPosition == 0) + { + dockersspace.Dock = DockStyle.Left; + dockerspanel.Setup(false); + dockerspanel.Location = dockersspace.Location; + dockerspanel.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom; + } + else + { + dockersspace.Dock = DockStyle.Right; + dockerspanel.Setup(true); + dockerspanel.Location = new Point(dockersspace.Right - General.Settings.DockersWidth, dockersspace.Top); + dockerspanel.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; + } + + dockerspanel.Width = General.Settings.DockersWidth; + dockerspanel.Height = dockersspace.Height; + dockerspanel.BringToFront(); + + General.LockWindowUpdate(IntPtr.Zero); + + if(General.Settings.CollapseDockers) + dockerspanel.Collapse(); } // This updates all menus for the current status