mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
better fix for lost key input after testing map
This commit is contained in:
parent
1a50bc16ba
commit
71282714ac
4 changed files with 91 additions and 1 deletions
|
@ -661,6 +661,7 @@
|
|||
<Compile Include="Rendering\RenderPasses.cs" />
|
||||
<Compile Include="VisualModes\VisualBlockEntry.cs" />
|
||||
<Compile Include="VisualModes\VisualPickResult.cs" />
|
||||
<Compile Include="VisualModes\VisualThing.cs" />
|
||||
<None Include="Resources\Script2.png" />
|
||||
<None Include="Resources\ScriptCompile.png" />
|
||||
<None Include="Resources\ScriptConstant.xpm" />
|
||||
|
|
|
@ -291,6 +291,7 @@ namespace CodeImp.DoomBuilder
|
|||
|
||||
// Done
|
||||
General.MainWindow.DisplayReady();
|
||||
General.MainWindow.FocusDisplay();
|
||||
Cursor.Current = oldcursor;
|
||||
}
|
||||
|
||||
|
|
83
Source/VisualModes/VisualThing.cs
Normal file
83
Source/VisualModes/VisualThing.cs
Normal file
|
@ -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<VisualThing>
|
||||
{
|
||||
#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
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue