mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-14 00:20:40 +00:00
Fixed, Thing/Linedef/Sector info panels: in some cases map element flags were cut off by the control border.
This commit is contained in:
parent
95985a8894
commit
584d649839
11 changed files with 91 additions and 18 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -464,3 +464,4 @@
|
||||||
/Build/D3D8.dll
|
/Build/D3D8.dll
|
||||||
/UpgradeLog.htm
|
/UpgradeLog.htm
|
||||||
/UpgradeLog2.htm
|
/UpgradeLog2.htm
|
||||||
|
/UpgradeLog3.htm
|
||||||
|
|
|
@ -838,6 +838,9 @@
|
||||||
<Compile Include="Controls\ToolStripNumericUpDown.cs">
|
<Compile Include="Controls\ToolStripNumericUpDown.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Controls\TransparentListView.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Controls\TransparentPanel.cs">
|
<Compile Include="Controls\TransparentPanel.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -109,7 +109,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
this.backlowname = new System.Windows.Forms.Label();
|
this.backlowname = new System.Windows.Forms.Label();
|
||||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
this.flagsPanel = new System.Windows.Forms.GroupBox();
|
this.flagsPanel = new System.Windows.Forms.GroupBox();
|
||||||
this.flags = new System.Windows.Forms.ListView();
|
this.flags = new CodeImp.DoomBuilder.Controls.TransparentListView();
|
||||||
this.infopanel.SuspendLayout();
|
this.infopanel.SuspendLayout();
|
||||||
this.frontpanel.SuspendLayout();
|
this.frontpanel.SuspendLayout();
|
||||||
this.flowLayoutPanelFront.SuspendLayout();
|
this.flowLayoutPanelFront.SuspendLayout();
|
||||||
|
@ -1017,7 +1017,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
this.flags.Name = "flags";
|
this.flags.Name = "flags";
|
||||||
this.flags.Scrollable = false;
|
this.flags.Scrollable = false;
|
||||||
this.flags.ShowGroups = false;
|
this.flags.ShowGroups = false;
|
||||||
this.flags.Size = new System.Drawing.Size(443, 73);
|
this.flags.Size = new System.Drawing.Size(443, 88);
|
||||||
this.flags.TabIndex = 0;
|
this.flags.TabIndex = 0;
|
||||||
this.flags.UseCompatibleStateImageBehavior = false;
|
this.flags.UseCompatibleStateImageBehavior = false;
|
||||||
this.flags.View = System.Windows.Forms.View.List;
|
this.flags.View = System.Windows.Forms.View.List;
|
||||||
|
@ -1145,7 +1145,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
private System.Windows.Forms.Label labelTextureBackBottom;
|
private System.Windows.Forms.Label labelTextureBackBottom;
|
||||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||||
private System.Windows.Forms.GroupBox flagsPanel;
|
private System.Windows.Forms.GroupBox flagsPanel;
|
||||||
private System.Windows.Forms.ListView flags;
|
private CodeImp.DoomBuilder.Controls.TransparentListView flags;
|
||||||
private System.Windows.Forms.Label taglabel;
|
private System.Windows.Forms.Label taglabel;
|
||||||
private System.Windows.Forms.Label anglelabel;
|
private System.Windows.Forms.Label anglelabel;
|
||||||
private System.Windows.Forms.Label lengthlabel;
|
private System.Windows.Forms.Label lengthlabel;
|
||||||
|
|
|
@ -512,7 +512,17 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
flagsPanel.Visible = (flags.Items.Count > 0);
|
flagsPanel.Visible = (flags.Items.Count > 0);
|
||||||
if(flags.Items.Count > 0)
|
if(flags.Items.Count > 0)
|
||||||
{
|
{
|
||||||
flags.Width = flags.GetItemRect(0).Width * (int)Math.Ceiling(flags.Items.Count / 4.0f);
|
Rectangle rect = flags.GetItemRect(0);
|
||||||
|
int itemspercolumn = 1;
|
||||||
|
|
||||||
|
// Check how many items per column we have...
|
||||||
|
for(int i = 1; i < flags.Items.Count; i++)
|
||||||
|
{
|
||||||
|
if(flags.GetItemRect(i).X != rect.X) break;
|
||||||
|
itemspercolumn++;
|
||||||
|
}
|
||||||
|
|
||||||
|
flags.Width = rect.Width * (int)Math.Ceiling(flags.Items.Count / (float)itemspercolumn);
|
||||||
flagsPanel.Width = flags.Width + flags.Left * 2;
|
flagsPanel.Width = flags.Width + flags.Left * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
8
Source/Core/Controls/SectorInfoPanel.Designer.cs
generated
8
Source/Core/Controls/SectorInfoPanel.Designer.cs
generated
|
@ -71,7 +71,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
this.labelFloorTextureSize = new System.Windows.Forms.Label();
|
this.labelFloorTextureSize = new System.Windows.Forms.Label();
|
||||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
this.flagsPanel = new System.Windows.Forms.GroupBox();
|
this.flagsPanel = new System.Windows.Forms.GroupBox();
|
||||||
this.flags = new System.Windows.Forms.ListView();
|
this.flags = new CodeImp.DoomBuilder.Controls.TransparentListView();
|
||||||
label13 = new System.Windows.Forms.Label();
|
label13 = new System.Windows.Forms.Label();
|
||||||
label5 = new System.Windows.Forms.Label();
|
label5 = new System.Windows.Forms.Label();
|
||||||
this.sectorinfo.SuspendLayout();
|
this.sectorinfo.SuspendLayout();
|
||||||
|
@ -128,7 +128,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
this.taglabel.Text = "Tag:";
|
this.taglabel.Text = "Tag:";
|
||||||
this.taglabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
this.taglabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
//
|
//
|
||||||
// labelEffect
|
// effectlabel
|
||||||
//
|
//
|
||||||
this.effectlabel.Location = new System.Drawing.Point(8, 19);
|
this.effectlabel.Location = new System.Drawing.Point(8, 19);
|
||||||
this.effectlabel.Name = "effectlabel";
|
this.effectlabel.Name = "effectlabel";
|
||||||
|
@ -531,7 +531,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
this.flags.Name = "flags";
|
this.flags.Name = "flags";
|
||||||
this.flags.Scrollable = false;
|
this.flags.Scrollable = false;
|
||||||
this.flags.ShowGroups = false;
|
this.flags.ShowGroups = false;
|
||||||
this.flags.Size = new System.Drawing.Size(443, 73);
|
this.flags.Size = new System.Drawing.Size(443, 88);
|
||||||
this.flags.TabIndex = 0;
|
this.flags.TabIndex = 0;
|
||||||
this.flags.UseCompatibleStateImageBehavior = false;
|
this.flags.UseCompatibleStateImageBehavior = false;
|
||||||
this.flags.View = System.Windows.Forms.View.List;
|
this.flags.View = System.Windows.Forms.View.List;
|
||||||
|
@ -600,7 +600,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
private System.Windows.Forms.Label labelFade;
|
private System.Windows.Forms.Label labelFade;
|
||||||
private System.Windows.Forms.Label labelLight;
|
private System.Windows.Forms.Label labelLight;
|
||||||
private System.Windows.Forms.GroupBox flagsPanel;
|
private System.Windows.Forms.GroupBox flagsPanel;
|
||||||
private System.Windows.Forms.ListView flags;
|
private CodeImp.DoomBuilder.Controls.TransparentListView flags;
|
||||||
private System.Windows.Forms.Label taglabel;
|
private System.Windows.Forms.Label taglabel;
|
||||||
private System.Windows.Forms.Label effectlabel;
|
private System.Windows.Forms.Label effectlabel;
|
||||||
private System.Windows.Forms.Label labelfloor;
|
private System.Windows.Forms.Label labelfloor;
|
||||||
|
|
|
@ -311,7 +311,17 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
flagsPanel.Visible = (flags.Items.Count > 0);
|
flagsPanel.Visible = (flags.Items.Count > 0);
|
||||||
if(flags.Items.Count > 0)
|
if(flags.Items.Count > 0)
|
||||||
{
|
{
|
||||||
flags.Width = flags.GetItemRect(0).Width * (int)Math.Ceiling(flags.Items.Count / 4.0f);
|
Rectangle rect = flags.GetItemRect(0);
|
||||||
|
int itemspercolumn = 1;
|
||||||
|
|
||||||
|
// Check how many items per column we have...
|
||||||
|
for(int i = 1; i < flags.Items.Count; i++)
|
||||||
|
{
|
||||||
|
if(flags.GetItemRect(i).X != rect.X) break;
|
||||||
|
itemspercolumn++;
|
||||||
|
}
|
||||||
|
|
||||||
|
flags.Width = rect.Width * (int)Math.Ceiling(flags.Items.Count / (float)itemspercolumn);
|
||||||
flagsPanel.Width = flags.Width + flags.Left * 2;
|
flagsPanel.Width = flags.Width + flags.Left * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
6
Source/Core/Controls/ThingInfoPanel.Designer.cs
generated
6
Source/Core/Controls/ThingInfoPanel.Designer.cs
generated
|
@ -59,7 +59,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
this.spritename = new System.Windows.Forms.Label();
|
this.spritename = new System.Windows.Forms.Label();
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
this.flagsPanel = new System.Windows.Forms.GroupBox();
|
this.flagsPanel = new System.Windows.Forms.GroupBox();
|
||||||
this.flags = new System.Windows.Forms.ListView();
|
this.flags = new CodeImp.DoomBuilder.Controls.TransparentListView();
|
||||||
this.flagsvalue = new System.Windows.Forms.Label();
|
this.flagsvalue = new System.Windows.Forms.Label();
|
||||||
this.flagsvaluelabel = new System.Windows.Forms.Label();
|
this.flagsvaluelabel = new System.Windows.Forms.Label();
|
||||||
this.spritetex = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox();
|
this.spritetex = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox();
|
||||||
|
@ -407,7 +407,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
this.flags.Name = "flags";
|
this.flags.Name = "flags";
|
||||||
this.flags.Scrollable = false;
|
this.flags.Scrollable = false;
|
||||||
this.flags.ShowGroups = false;
|
this.flags.ShowGroups = false;
|
||||||
this.flags.Size = new System.Drawing.Size(556, 73);
|
this.flags.Size = new System.Drawing.Size(556, 88);
|
||||||
this.flags.TabIndex = 0;
|
this.flags.TabIndex = 0;
|
||||||
this.flags.UseCompatibleStateImageBehavior = false;
|
this.flags.UseCompatibleStateImageBehavior = false;
|
||||||
this.flags.View = System.Windows.Forms.View.List;
|
this.flags.View = System.Windows.Forms.View.List;
|
||||||
|
@ -500,7 +500,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
private System.Windows.Forms.Label arg1;
|
private System.Windows.Forms.Label arg1;
|
||||||
private System.Windows.Forms.GroupBox infopanel;
|
private System.Windows.Forms.GroupBox infopanel;
|
||||||
private System.Windows.Forms.GroupBox flagsPanel;
|
private System.Windows.Forms.GroupBox flagsPanel;
|
||||||
private System.Windows.Forms.ListView flags;
|
private CodeImp.DoomBuilder.Controls.TransparentListView flags;
|
||||||
private System.Windows.Forms.Label flagsvalue;
|
private System.Windows.Forms.Label flagsvalue;
|
||||||
private System.Windows.Forms.Label flagsvaluelabel;
|
private System.Windows.Forms.Label flagsvaluelabel;
|
||||||
private System.Windows.Forms.Label labelangle;
|
private System.Windows.Forms.Label labelangle;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#region ================== Namespaces
|
#region ================== Namespaces
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using CodeImp.DoomBuilder.Data;
|
using CodeImp.DoomBuilder.Data;
|
||||||
|
@ -237,9 +238,20 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd. Flags panel visibility and size
|
//mxd. Flags panel visibility and size
|
||||||
if (flags.Items.Count > 0)
|
flagsPanel.Visible = (flags.Items.Count > 0);
|
||||||
|
if(flags.Items.Count > 0)
|
||||||
{
|
{
|
||||||
flags.Width = flags.GetItemRect(0).Width * (int)Math.Ceiling(flags.Items.Count / 4.0f);
|
Rectangle rect = flags.GetItemRect(0);
|
||||||
|
int itemspercolumn = 1;
|
||||||
|
|
||||||
|
// Check how many items per column we have...
|
||||||
|
for(int i = 1; i < flags.Items.Count; i++)
|
||||||
|
{
|
||||||
|
if(flags.GetItemRect(i).X != rect.X) break;
|
||||||
|
itemspercolumn++;
|
||||||
|
}
|
||||||
|
|
||||||
|
flags.Width = rect.Width * (int)Math.Ceiling(flags.Items.Count / (float)itemspercolumn);
|
||||||
flagsPanel.Width = flags.Width + flags.Left * 2;
|
flagsPanel.Width = flags.Width + flags.Left * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
23
Source/Core/Controls/TransparentListView.cs
Normal file
23
Source/Core/Controls/TransparentListView.cs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace CodeImp.DoomBuilder.Controls
|
||||||
|
{
|
||||||
|
public class TransparentListView : ListView
|
||||||
|
{
|
||||||
|
protected override CreateParams CreateParams
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
CreateParams cp = base.CreateParams;
|
||||||
|
cp.ExStyle |= 0x00000020; //WS_EX_TRANSPARENT
|
||||||
|
|
||||||
|
return cp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaintBackground(PaintEventArgs pevent)
|
||||||
|
{
|
||||||
|
// Don't paint background
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
Source/Core/Windows/MainForm.Designer.cs
generated
12
Source/Core/Windows/MainForm.Designer.cs
generated
|
@ -2466,31 +2466,37 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
//
|
//
|
||||||
// linedefinfo
|
// linedefinfo
|
||||||
//
|
//
|
||||||
|
this.linedefinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.linedefinfo.Location = new System.Drawing.Point(3, 3);
|
this.linedefinfo.Location = new System.Drawing.Point(3, 3);
|
||||||
this.linedefinfo.MaximumSize = new System.Drawing.Size(10000, 100);
|
this.linedefinfo.MaximumSize = new System.Drawing.Size(10000, 100);
|
||||||
this.linedefinfo.MinimumSize = new System.Drawing.Size(100, 100);
|
this.linedefinfo.MinimumSize = new System.Drawing.Size(100, 100);
|
||||||
this.linedefinfo.Name = "linedefinfo";
|
this.linedefinfo.Name = "linedefinfo";
|
||||||
this.linedefinfo.Size = new System.Drawing.Size(1560, 100);
|
this.linedefinfo.Size = new System.Drawing.Size(1006, 100);
|
||||||
this.linedefinfo.TabIndex = 0;
|
this.linedefinfo.TabIndex = 0;
|
||||||
this.linedefinfo.Visible = false;
|
this.linedefinfo.Visible = false;
|
||||||
//
|
//
|
||||||
// thinginfo
|
// thinginfo
|
||||||
//
|
//
|
||||||
|
this.thinginfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.thinginfo.Location = new System.Drawing.Point(3, 3);
|
this.thinginfo.Location = new System.Drawing.Point(3, 3);
|
||||||
this.thinginfo.MaximumSize = new System.Drawing.Size(10000, 100);
|
this.thinginfo.MaximumSize = new System.Drawing.Size(10000, 100);
|
||||||
this.thinginfo.MinimumSize = new System.Drawing.Size(100, 100);
|
this.thinginfo.MinimumSize = new System.Drawing.Size(100, 100);
|
||||||
this.thinginfo.Name = "thinginfo";
|
this.thinginfo.Name = "thinginfo";
|
||||||
this.thinginfo.Size = new System.Drawing.Size(1190, 100);
|
this.thinginfo.Size = new System.Drawing.Size(1006, 100);
|
||||||
this.thinginfo.TabIndex = 3;
|
this.thinginfo.TabIndex = 3;
|
||||||
this.thinginfo.Visible = false;
|
this.thinginfo.Visible = false;
|
||||||
//
|
//
|
||||||
// sectorinfo
|
// sectorinfo
|
||||||
//
|
//
|
||||||
|
this.sectorinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.sectorinfo.Location = new System.Drawing.Point(3, 3);
|
this.sectorinfo.Location = new System.Drawing.Point(3, 3);
|
||||||
this.sectorinfo.MaximumSize = new System.Drawing.Size(10000, 100);
|
this.sectorinfo.MaximumSize = new System.Drawing.Size(10000, 100);
|
||||||
this.sectorinfo.MinimumSize = new System.Drawing.Size(100, 100);
|
this.sectorinfo.MinimumSize = new System.Drawing.Size(100, 100);
|
||||||
this.sectorinfo.Name = "sectorinfo";
|
this.sectorinfo.Name = "sectorinfo";
|
||||||
this.sectorinfo.Size = new System.Drawing.Size(1090, 100);
|
this.sectorinfo.Size = new System.Drawing.Size(1006, 100);
|
||||||
this.sectorinfo.TabIndex = 2;
|
this.sectorinfo.TabIndex = 2;
|
||||||
this.sectorinfo.Visible = false;
|
this.sectorinfo.Visible = false;
|
||||||
//
|
//
|
||||||
|
|
|
@ -45,6 +45,8 @@ namespace CodeImp.DoomBuilder.ZDoom
|
||||||
private readonly int xoffset;
|
private readonly int xoffset;
|
||||||
private readonly int yoffset;
|
private readonly int yoffset;
|
||||||
private readonly bool worldpanning;
|
private readonly bool worldpanning;
|
||||||
|
private readonly bool optional; //mxd
|
||||||
|
private readonly bool nulltexture; //mxd
|
||||||
|
|
||||||
// Patches
|
// Patches
|
||||||
private readonly List<PatchStructure> patches;
|
private readonly List<PatchStructure> patches;
|
||||||
|
@ -61,7 +63,8 @@ namespace CodeImp.DoomBuilder.ZDoom
|
||||||
public float YScale { get { return yscale; } }
|
public float YScale { get { return yscale; } }
|
||||||
public int XOffset { get { return xoffset; } }
|
public int XOffset { get { return xoffset; } }
|
||||||
public int YOffset { get { return yoffset; } }
|
public int YOffset { get { return yoffset; } }
|
||||||
public bool WorldPanning { get { return worldpanning; } }
|
public bool Optional { get { return optional; } }
|
||||||
|
public bool NullTexture { get { return nulltexture; } }
|
||||||
public ICollection<PatchStructure> Patches { get { return patches; } }
|
public ICollection<PatchStructure> Patches { get { return patches; } }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -88,6 +91,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
||||||
//mxd. It can also be "optional" keyword.
|
//mxd. It can also be "optional" keyword.
|
||||||
if(name.ToLowerInvariant() == "optional")
|
if(name.ToLowerInvariant() == "optional")
|
||||||
{
|
{
|
||||||
|
optional = true;
|
||||||
parser.SkipWhitespace(true);
|
parser.SkipWhitespace(true);
|
||||||
name = parser.StripTokenQuotes(parser.ReadToken(false)); //mxd. Don't skip newline
|
name = parser.StripTokenQuotes(parser.ReadToken(false)); //mxd. Don't skip newline
|
||||||
}
|
}
|
||||||
|
@ -150,6 +154,10 @@ namespace CodeImp.DoomBuilder.ZDoom
|
||||||
worldpanning = true;
|
worldpanning = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "nulltexture": //mxd
|
||||||
|
nulltexture = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case "offset":
|
case "offset":
|
||||||
// Read x offset
|
// Read x offset
|
||||||
if(!ReadTokenInt(parser, token, out xoffset)) return;
|
if(!ReadTokenInt(parser, token, out xoffset)) return;
|
||||||
|
|
Loading…
Reference in a new issue