mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
bug fixed that prevented editing dialogs from showing up
This commit is contained in:
parent
7405b25612
commit
447ad32c57
8 changed files with 15 additions and 10 deletions
|
@ -362,7 +362,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
ICollection<Linedef> selected = General.Map.Map.GetSelectedLinedefs(true);
|
||||
if(selected.Count > 0)
|
||||
{
|
||||
if(General.Interface.HasFocus)
|
||||
if(General.Interface.IsActiveWindow)
|
||||
{
|
||||
// Show line edit dialog
|
||||
General.Interface.ShowEditLinedefs(selected);
|
||||
|
|
|
@ -448,7 +448,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
ICollection<Sector> selected = General.Map.Map.GetSelectedSectors(true);
|
||||
if(selected.Count > 0)
|
||||
{
|
||||
if(General.Interface.HasFocus)
|
||||
if(General.Interface.IsActiveWindow)
|
||||
{
|
||||
// Show sector edit dialog
|
||||
General.Interface.ShowEditSectors(selected);
|
||||
|
|
|
@ -355,7 +355,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
ICollection<Thing> selected = General.Map.Map.GetSelectedThings(true);
|
||||
if(selected.Count > 0)
|
||||
{
|
||||
if(General.Interface.HasFocus)
|
||||
if(General.Interface.IsActiveWindow)
|
||||
{
|
||||
// Show thing edit dialog
|
||||
General.Interface.ShowEditThings(selected);
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Select texture
|
||||
public virtual void OnSelectTexture()
|
||||
{
|
||||
if(General.Interface.HasFocus)
|
||||
if(General.Interface.IsActiveWindow)
|
||||
{
|
||||
string oldtexture = GetTextureName();
|
||||
string newtexture = General.Interface.BrowseFlat(General.Interface, oldtexture);
|
||||
|
@ -118,7 +118,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Not using any modifier buttons
|
||||
if(!General.Interface.ShiftState && !General.Interface.CtrlState && !General.Interface.AltState)
|
||||
{
|
||||
if(General.Interface.HasFocus)
|
||||
if(General.Interface.IsActiveWindow)
|
||||
{
|
||||
List<Sector> sectors = new List<Sector>();
|
||||
sectors.Add(this.Sector.Sector);
|
||||
|
|
|
@ -212,7 +212,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Select texture
|
||||
public virtual void OnSelectTexture()
|
||||
{
|
||||
if(General.Interface.HasFocus)
|
||||
if(General.Interface.IsActiveWindow)
|
||||
{
|
||||
string oldtexture = GetTextureName();
|
||||
string newtexture = General.Interface.BrowseTexture(General.Interface, oldtexture);
|
||||
|
@ -276,7 +276,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Not using any modifier buttons
|
||||
if(!General.Interface.ShiftState && !General.Interface.CtrlState && !General.Interface.AltState)
|
||||
{
|
||||
if(General.Interface.HasFocus)
|
||||
if(General.Interface.IsActiveWindow)
|
||||
{
|
||||
List<Linedef> lines = new List<Linedef>();
|
||||
lines.Add(this.Sidedef.Line);
|
||||
|
|
|
@ -358,7 +358,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Not using any modifier buttons
|
||||
if(!General.Interface.ShiftState && !General.Interface.CtrlState && !General.Interface.AltState)
|
||||
{
|
||||
if(General.Interface.HasFocus)
|
||||
if(General.Interface.IsActiveWindow)
|
||||
{
|
||||
List<Thing> things = new List<Thing>();
|
||||
things.Add(this.Thing);
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
bool SnapToGrid { get; }
|
||||
bool MouseExclusive { get; }
|
||||
MouseButtons MouseButtons { get; }
|
||||
bool HasFocus { get; }
|
||||
bool IsActiveWindow { get; }
|
||||
|
||||
// Methods
|
||||
void DisplayReady();
|
||||
|
|
|
@ -89,6 +89,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private Point lastposition;
|
||||
private Size lastsize;
|
||||
private bool displayresized = true;
|
||||
private bool windowactive;
|
||||
|
||||
// Mouse in display
|
||||
private bool mouseinside;
|
||||
|
@ -147,7 +148,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
public bool MouseExclusive { get { return mouseexclusive; } }
|
||||
new public IntPtr Handle { get { return windowptr; } }
|
||||
public bool IsInfoPanelExpanded { get { return (panelinfo.Height == EXPANDED_INFO_HEIGHT); } }
|
||||
public bool HasFocus { get { return this.Focused; } }
|
||||
public bool IsActiveWindow { get { return windowactive; } }
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -372,6 +373,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Window receives focus
|
||||
private void MainForm_Activated(object sender, EventArgs e)
|
||||
{
|
||||
windowactive = true;
|
||||
|
||||
// Resume any exclusive mouse input
|
||||
ResumeExclusiveMouseInput();
|
||||
display.Focus();
|
||||
|
@ -380,6 +383,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Window loses focus
|
||||
private void MainForm_Deactivate(object sender, EventArgs e)
|
||||
{
|
||||
windowactive = false;
|
||||
|
||||
// Release all pressed keys
|
||||
General.Actions.ReleaseAllKeys();
|
||||
mousebuttons = MouseButtons.None;
|
||||
|
|
Loading…
Reference in a new issue