mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 14:12:16 +00:00
c325d7ec14
Fixed, Sectors mode: holding Alt to (de)select things inside of sectors worked only in band selection mode. Now it also works when selecting individual sectors and when using paint selection mode. Fixed, Statistics Control: forgot to remove some test code in r2176... Internal: removed several unused icons.
37 lines
1.6 KiB
C#
37 lines
1.6 KiB
C#
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
namespace CodeImp.DoomBuilder.Controls
|
|
{
|
|
public partial class StatisticsControl : UserControl
|
|
{
|
|
public StatisticsControl()
|
|
{
|
|
InitializeComponent();
|
|
this.Visible = false;
|
|
}
|
|
|
|
public void UpdateStatistics()
|
|
{
|
|
// Update statistics
|
|
verticescount.Text = General.Map.Map.Vertices.Count.ToString();
|
|
linedefscount.Text = General.Map.Map.Linedefs.Count.ToString();
|
|
sidedefscount.Text = General.Map.Map.Sidedefs.Count.ToString();
|
|
sectorscount.Text = General.Map.Map.Sectors.Count.ToString();
|
|
thingscount.Text = General.Map.Map.Things.Count.ToString();
|
|
|
|
// Exceeding them limits?
|
|
verticescount.ForeColor = (General.Map.Map.Vertices.Count > General.Map.FormatInterface.MaxVertices ? Color.Red : SystemColors.GrayText);
|
|
linedefscount.ForeColor = (General.Map.Map.Linedefs.Count > General.Map.FormatInterface.MaxLinedefs ? Color.Red : SystemColors.GrayText);
|
|
sidedefscount.ForeColor = (General.Map.Map.Sidedefs.Count > General.Map.FormatInterface.MaxSidedefs ? Color.Red : SystemColors.GrayText);
|
|
sectorscount.ForeColor = (General.Map.Map.Sectors.Count > General.Map.FormatInterface.MaxSectors ? Color.Red : SystemColors.GrayText);
|
|
thingscount.ForeColor = (General.Map.Map.Things.Count > General.Map.FormatInterface.MaxThings ? Color.Red : SystemColors.GrayText);
|
|
|
|
verticeslabel.ForeColor = verticescount.ForeColor;
|
|
linedefslabel.ForeColor = linedefscount.ForeColor;
|
|
sidedefslabel.ForeColor = sidedefscount.ForeColor;
|
|
sectorslabel.ForeColor = sectorscount.ForeColor;
|
|
thingslabel.ForeColor = thingscount.ForeColor;
|
|
}
|
|
}
|
|
}
|