diff --git a/Source/Builder.csproj b/Source/Builder.csproj index 4395e190..0bbc9d8b 100644 --- a/Source/Builder.csproj +++ b/Source/Builder.csproj @@ -661,6 +661,7 @@ + diff --git a/Source/General/Launcher.cs b/Source/General/Launcher.cs index 2640eeb7..3d8461e0 100644 --- a/Source/General/Launcher.cs +++ b/Source/General/Launcher.cs @@ -291,6 +291,7 @@ namespace CodeImp.DoomBuilder // Done General.MainWindow.DisplayReady(); + General.MainWindow.FocusDisplay(); Cursor.Current = oldcursor; } diff --git a/Source/VisualModes/VisualThing.cs b/Source/VisualModes/VisualThing.cs new file mode 100644 index 00000000..70a2bda3 --- /dev/null +++ b/Source/VisualModes/VisualThing.cs @@ -0,0 +1,83 @@ + +#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; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.Windows.Forms; +using System.IO; +using System.Reflection; +using System.Drawing; +using System.ComponentModel; +using CodeImp.DoomBuilder.Map; +using SlimDX.Direct3D9; +using SlimDX; +using CodeImp.DoomBuilder.Geometry; +using System.Drawing.Imaging; +using CodeImp.DoomBuilder.Data; +using CodeImp.DoomBuilder.Editing; +using CodeImp.DoomBuilder.IO; +using CodeImp.DoomBuilder.Rendering; + +#endregion + +namespace CodeImp.DoomBuilder.VisualModes +{ + public abstract class VisualThing : IComparable + { + #region ================== Constants + + #endregion + + #region ================== Variables + + // Thing + private Thing thing; + + #endregion + + #region ================== Properties + + public Thing Thing { get { return thing; } } + + #endregion + + #region ================== Constructor / Destructor + + // Constructor + public VisualThing(Thing t) + { + // Initialize + this.thing = t; + } + + #endregion + + #region ================== Methods + + // This compares for sorting by sprite + public int CompareTo(VisualThing other) + { + return 0; + } + + #endregion + } +} diff --git a/Source/Windows/MainForm.cs b/Source/Windows/MainForm.cs index c497efe9..97ddd92a 100644 --- a/Source/Windows/MainForm.cs +++ b/Source/Windows/MainForm.cs @@ -268,6 +268,12 @@ namespace CodeImp.DoomBuilder.Windows #region ================== Window + // This sets the focus on the display for correct key input + public bool FocusDisplay() + { + return display.Focus(); + } + // Window is first shown private void MainForm_Shown(object sender, EventArgs e) { @@ -603,7 +609,6 @@ namespace CodeImp.DoomBuilder.Windows // Refresh if needed statusbar.Invalidate(); this.Update(); - if(display.Enabled) display.Focus(); } // This updates the status icon