2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
#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;
|
2014-12-03 09:06:05 +00:00
|
|
|
using System.Drawing;
|
2015-03-03 09:42:54 +00:00
|
|
|
using System.Globalization;
|
2009-04-19 18:07:22 +00:00
|
|
|
using System.Windows.Forms;
|
|
|
|
using CodeImp.DoomBuilder.Map;
|
2013-06-17 13:17:53 +00:00
|
|
|
using CodeImp.DoomBuilder.Data;
|
2013-09-11 08:49:45 +00:00
|
|
|
using CodeImp.DoomBuilder.Rendering;
|
2013-12-05 09:24:55 +00:00
|
|
|
using System.Collections.Generic;
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.Controls
|
|
|
|
{
|
|
|
|
internal partial class SectorInfoPanel : UserControl
|
|
|
|
{
|
2014-12-05 14:33:31 +00:00
|
|
|
private readonly List<Label> floorinfolabels;
|
|
|
|
private readonly List<Label> ceilinfolabels;
|
2014-12-03 09:06:05 +00:00
|
|
|
private readonly List<Label> floorlabels;
|
|
|
|
private readonly List<Label> ceillabels;
|
2012-10-03 18:46:13 +00:00
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
// Constructor
|
|
|
|
public SectorInfoPanel()
|
|
|
|
{
|
|
|
|
// Initialize
|
|
|
|
InitializeComponent();
|
2014-12-03 09:06:05 +00:00
|
|
|
|
|
|
|
//mxd
|
|
|
|
labelFloorTextureSize.BackColor = Color.FromArgb(128, labelFloorTextureSize.BackColor);
|
|
|
|
labelCeilTextureSize.BackColor = Color.FromArgb(128, labelCeilTextureSize.BackColor);
|
|
|
|
|
2014-12-05 14:33:31 +00:00
|
|
|
floorinfolabels = new List<Label> { floorAngle, floorLight, floorOffset, floorScale };
|
|
|
|
ceilinfolabels = new List<Label> { ceilingAngle, ceilingLight, ceilingOffset, ceilingScale };
|
|
|
|
floorlabels = new List<Label> { floorAngleLabel, floorLightLabel, floorOffsetLabel, floorScaleLabel };
|
|
|
|
ceillabels = new List<Label> { ceilingAngleLabel, ceilingLightLabel, ceilingOffsetLabel, ceilingScaleLabel };
|
2009-04-19 18:07:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// This shows the info
|
|
|
|
public void ShowInfo(Sector s)
|
|
|
|
{
|
|
|
|
int sheight = s.CeilHeight - s.FloorHeight;
|
|
|
|
|
|
|
|
// Lookup effect description in config
|
2014-09-04 12:34:26 +00:00
|
|
|
string effectinfo = s.Effect + " - " + General.Map.Config.GetSectorEffectInfo(s.Effect).Title; //mxd
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
// Sector info
|
2013-09-09 14:03:02 +00:00
|
|
|
sectorinfo.Text = " Sector " + s.Index + " (" + (s.Sidedefs == null ? "no" : s.Sidedefs.Count.ToString()) + " sidedefs)"; //mxd
|
2009-04-19 18:07:22 +00:00
|
|
|
effect.Text = effectinfo;
|
|
|
|
ceiling.Text = s.CeilHeight.ToString();
|
|
|
|
floor.Text = s.FloorHeight.ToString();
|
2014-12-08 21:06:08 +00:00
|
|
|
tag.Text = s.Tag + (General.Map.Options.TagLabels.ContainsKey(s.Tag) ? " - " + General.Map.Options.TagLabels[s.Tag] : string.Empty);
|
2009-04-19 18:07:22 +00:00
|
|
|
height.Text = sheight.ToString();
|
|
|
|
brightness.Text = s.Brightness.ToString();
|
2014-12-03 09:06:05 +00:00
|
|
|
floorname.Text = s.FloorTexture;
|
|
|
|
ceilingname.Text = s.CeilTexture;
|
2013-06-17 13:17:53 +00:00
|
|
|
|
2014-12-03 09:06:05 +00:00
|
|
|
//mxd
|
|
|
|
effect.Enabled = (s.Effect != 0);
|
|
|
|
labelEffect.Enabled = (s.Effect != 0);
|
|
|
|
tag.Enabled = (s.Tag != 0);
|
|
|
|
labelTag.Enabled = (s.Tag != 0);
|
|
|
|
|
|
|
|
//mxd. Texture size
|
2014-11-25 11:52:01 +00:00
|
|
|
if (s.LongFloorTexture == MapSet.EmptyLongName)
|
|
|
|
{
|
2013-08-26 11:09:37 +00:00
|
|
|
labelFloorTextureSize.Visible = false;
|
2013-07-31 12:38:47 +00:00
|
|
|
General.DisplayZoomedImage(floortex, Properties.Resources.MissingTexture);
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ImageData image = General.Map.Data.GetFlatImage(s.FloorTexture);
|
|
|
|
DisplayTextureSize(labelFloorTextureSize, image);
|
|
|
|
General.DisplayZoomedImage(floortex, image.GetPreview());
|
2013-07-31 12:38:47 +00:00
|
|
|
}
|
2013-06-17 13:17:53 +00:00
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
if (s.LongCeilTexture == MapSet.EmptyLongName)
|
|
|
|
{
|
2013-08-26 11:09:37 +00:00
|
|
|
labelCeilTextureSize.Visible = false;
|
2013-07-31 12:38:47 +00:00
|
|
|
General.DisplayZoomedImage(ceilingtex, Properties.Resources.MissingTexture);
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ImageData image = General.Map.Data.GetFlatImage(s.CeilTexture);
|
|
|
|
DisplayTextureSize(labelCeilTextureSize, image); //mxd
|
|
|
|
General.DisplayZoomedImage(ceilingtex, image.GetPreview());
|
2013-07-31 12:38:47 +00:00
|
|
|
}
|
2009-04-19 18:07:22 +00:00
|
|
|
|
2012-10-03 18:46:13 +00:00
|
|
|
//mxd
|
|
|
|
bool showExtededFloorInfo = false;
|
|
|
|
bool showExtededCeilingInfo = false;
|
2014-11-25 11:52:01 +00:00
|
|
|
if(General.Map.UDMF)
|
|
|
|
{
|
|
|
|
if(s.Fields != null)
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
//sector colors
|
|
|
|
labelLight.Visible = true;
|
|
|
|
labelFade.Visible = true;
|
|
|
|
panelLightColor.Visible = true;
|
|
|
|
panelFadeColor.Visible = true;
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
if(s.Fields.ContainsKey("lightcolor"))
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
panelLightColor.BackColor = PixelColor.FromInt(s.Fields.GetValue("lightcolor", 0xFFFFFF)).WithAlpha(255).ToColor();
|
|
|
|
labelLight.Enabled = true;
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-12-03 09:06:05 +00:00
|
|
|
panelLightColor.BackColor = SystemColors.Control;
|
2013-12-05 09:24:55 +00:00
|
|
|
labelLight.Enabled = false;
|
|
|
|
}
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
if(s.Fields.ContainsKey("fadecolor"))
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
panelFadeColor.BackColor = PixelColor.FromInt(s.Fields.GetValue("fadecolor", 0)).WithAlpha(255).ToColor();
|
|
|
|
labelFade.Enabled = true;
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-12-03 09:06:05 +00:00
|
|
|
panelFadeColor.BackColor = SystemColors.Control;
|
2013-12-05 09:24:55 +00:00
|
|
|
labelFade.Enabled = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//light
|
2014-11-25 11:52:01 +00:00
|
|
|
if(s.Fields.ContainsKey("lightceiling") || s.Fields.ContainsKey("lightceilingabsolute"))
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
showExtededCeilingInfo = true;
|
|
|
|
ceilingLight.Enabled = true;
|
|
|
|
ceilingLightLabel.Enabled = true;
|
|
|
|
|
|
|
|
int cl = s.Fields.GetValue("lightceiling", 0);
|
|
|
|
|
|
|
|
if(s.Fields.GetValue("lightceilingabsolute", false))
|
|
|
|
ceilingLight.Text = cl + " (abs.)";
|
|
|
|
else
|
|
|
|
ceilingLight.Text = cl + " (" + Math.Min(255, Math.Max(0, (cl + s.Brightness))) + ")";
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
ceilingLight.Text = "--";
|
|
|
|
ceilingLight.Enabled = false;
|
|
|
|
ceilingLightLabel.Enabled = false;
|
|
|
|
}
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
if(s.Fields.ContainsKey("lightfloor") || s.Fields.ContainsKey("lightfloorabsolute"))
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
showExtededFloorInfo = true;
|
|
|
|
floorLight.Enabled = true;
|
|
|
|
floorLightLabel.Enabled = true;
|
|
|
|
|
|
|
|
int fl = s.Fields.GetValue("lightfloor", 0);
|
|
|
|
|
|
|
|
if(s.Fields.GetValue("lightfloorabsolute", false))
|
|
|
|
floorLight.Text = fl + " (abs.)";
|
|
|
|
else
|
|
|
|
floorLight.Text = fl + " (" + Math.Min(255, Math.Max(0, (fl + s.Brightness))) + ")";
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
floorLight.Text = "--";
|
|
|
|
floorLight.Enabled = false;
|
|
|
|
floorLightLabel.Enabled = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//ceiling offsets
|
|
|
|
float panX = s.Fields.GetValue("xpanningceiling", 0f);
|
|
|
|
float panY = s.Fields.GetValue("ypanningceiling", 0f);
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
if(panX != 0 || panY != 0)
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
showExtededCeilingInfo = true;
|
|
|
|
ceilingOffset.Enabled = true;
|
|
|
|
ceilingOffsetLabel.Enabled = true;
|
2015-03-03 09:42:54 +00:00
|
|
|
ceilingOffset.Text = panX.ToString(CultureInfo.InvariantCulture) + ", " + panY.ToString(CultureInfo.InvariantCulture);
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
ceilingOffset.Text = "--, --";
|
|
|
|
ceilingOffset.Enabled = false;
|
|
|
|
ceilingOffsetLabel.Enabled = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//floor offsets
|
|
|
|
panX = s.Fields.GetValue("xpanningfloor", 0f);
|
|
|
|
panY = s.Fields.GetValue("ypanningfloor", 0f);
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
if(panX != 0 || panY != 0)
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
showExtededFloorInfo = true;
|
|
|
|
floorOffset.Enabled = true;
|
|
|
|
floorOffsetLabel.Enabled = true;
|
2015-03-03 09:42:54 +00:00
|
|
|
floorOffset.Text = panX.ToString(CultureInfo.InvariantCulture) + ", " + panY.ToString(CultureInfo.InvariantCulture);
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
floorOffset.Text = "--, --";
|
|
|
|
floorOffset.Enabled = false;
|
|
|
|
floorOffsetLabel.Enabled = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//ceiling scale
|
2015-03-03 09:42:54 +00:00
|
|
|
float scaleX = s.Fields.GetValue("xscaleceiling", 1.0f);
|
2013-12-05 09:24:55 +00:00
|
|
|
float scaleY = s.Fields.GetValue("yscaleceiling", 1.0f);
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
if(scaleX != 1.0f || scaleY != 1.0f)
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
showExtededCeilingInfo = true;
|
|
|
|
ceilingScale.Enabled = true;
|
|
|
|
ceilingScaleLabel.Enabled = true;
|
2015-03-03 09:42:54 +00:00
|
|
|
ceilingScale.Text = scaleX.ToString(CultureInfo.InvariantCulture) + ", " + scaleY.ToString(CultureInfo.InvariantCulture);
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
ceilingScale.Text = "--, --";
|
|
|
|
ceilingScale.Enabled = false;
|
|
|
|
ceilingScaleLabel.Enabled = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//floor scale
|
|
|
|
scaleX = s.Fields.GetValue("xscalefloor", 1.0f);
|
|
|
|
scaleY = s.Fields.GetValue("yscalefloor", 1.0f);
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
if(scaleX != 1.0f || scaleY != 1.0f)
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
showExtededFloorInfo = true;
|
|
|
|
floorScale.Enabled = true;
|
|
|
|
floorScaleLabel.Enabled = true;
|
2015-03-03 09:42:54 +00:00
|
|
|
floorScale.Text = scaleX.ToString(CultureInfo.InvariantCulture) + ", " + scaleY.ToString(CultureInfo.InvariantCulture);
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
floorScale.Text = "--, --";
|
|
|
|
floorScale.Enabled = false;
|
|
|
|
floorScaleLabel.Enabled = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//rotation
|
2014-11-25 11:52:01 +00:00
|
|
|
if(s.Fields.ContainsKey("rotationceiling"))
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
showExtededCeilingInfo = true;
|
|
|
|
ceilingAngle.Enabled = true;
|
|
|
|
ceilingAngleLabel.Enabled = true;
|
2014-02-21 14:42:12 +00:00
|
|
|
ceilingAngle.Text = s.Fields["rotationceiling"].Value + "\u00B0";
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-12-03 09:06:05 +00:00
|
|
|
ceilingAngle.Text = "--";
|
2013-12-05 09:24:55 +00:00
|
|
|
ceilingAngle.Enabled = false;
|
|
|
|
ceilingAngleLabel.Enabled = false;
|
|
|
|
}
|
|
|
|
|
2014-11-25 11:52:01 +00:00
|
|
|
if(s.Fields.ContainsKey("rotationfloor"))
|
|
|
|
{
|
2013-12-05 09:24:55 +00:00
|
|
|
showExtededFloorInfo = true;
|
|
|
|
floorAngle.Enabled = true;
|
|
|
|
floorAngleLabel.Enabled = true;
|
2014-02-21 14:42:12 +00:00
|
|
|
floorAngle.Text = s.Fields["rotationfloor"].Value + "\u00B0";
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-12-03 09:06:05 +00:00
|
|
|
floorAngle.Text = "--";
|
2013-12-05 09:24:55 +00:00
|
|
|
floorAngle.Enabled = false;
|
|
|
|
floorAngleLabel.Enabled = false;
|
|
|
|
}
|
2013-09-11 08:49:45 +00:00
|
|
|
}
|
|
|
|
|
2013-12-05 09:24:55 +00:00
|
|
|
//Flags
|
|
|
|
flags.Items.Clear();
|
2014-11-25 11:52:01 +00:00
|
|
|
foreach(KeyValuePair<string, bool> group in s.Flags)
|
|
|
|
{
|
|
|
|
if(group.Value)
|
|
|
|
{
|
2013-12-17 08:19:40 +00:00
|
|
|
ListViewItem item = new ListViewItem(General.Map.Config.SectorFlags.ContainsKey(group.Key) ? General.Map.Config.SectorFlags[group.Key] : group.Key);
|
2013-12-05 09:24:55 +00:00
|
|
|
item.Checked = true;
|
|
|
|
flags.Items.Add(item);
|
|
|
|
}
|
2012-10-03 18:46:13 +00:00
|
|
|
}
|
|
|
|
|
2013-12-05 09:24:55 +00:00
|
|
|
//mxd. Flags panel visibility and size
|
|
|
|
flagsPanel.Visible = (flags.Items.Count > 0);
|
2014-11-25 11:52:01 +00:00
|
|
|
if(flags.Items.Count > 0)
|
|
|
|
{
|
2015-03-23 20:16:14 +00:00
|
|
|
flags.Width = flags.GetItemRect(0).Width * (int)Math.Ceiling(flags.Items.Count / 5.0f);
|
2013-12-05 09:24:55 +00:00
|
|
|
flagsPanel.Width = flags.Width + flags.Left * 2;
|
2012-10-03 18:46:13 +00:00
|
|
|
}
|
2014-12-05 14:33:31 +00:00
|
|
|
|
|
|
|
//mxd. Toggle visibility
|
|
|
|
foreach(Label label in floorinfolabels) label.Visible = showExtededFloorInfo;
|
|
|
|
foreach(Label label in floorlabels) label.Visible = showExtededFloorInfo;
|
|
|
|
foreach(Label label in ceilinfolabels) label.Visible = showExtededCeilingInfo;
|
|
|
|
foreach(Label label in ceillabels) label.Visible = showExtededCeilingInfo;
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-09-11 08:49:45 +00:00
|
|
|
panelFadeColor.Visible = false;
|
|
|
|
panelLightColor.Visible = false;
|
|
|
|
labelFade.Visible = false;
|
|
|
|
labelLight.Visible = false;
|
2013-12-05 09:24:55 +00:00
|
|
|
flagsPanel.Visible = false;
|
2012-10-03 18:46:13 +00:00
|
|
|
}
|
|
|
|
|
2014-12-03 09:06:05 +00:00
|
|
|
//mxd. Resize panels
|
2014-12-05 14:33:31 +00:00
|
|
|
UpdateTexturePanel(ceilingpanel, ceilingname, ceilinfolabels, ceilingtex, ceilingOffsetLabel.Location.X - 1, showExtededCeilingInfo);
|
|
|
|
UpdateTexturePanel(floorpanel, floorname, floorinfolabels, floortex, floorOffsetLabel.Location.X - 1, showExtededFloorInfo);
|
2012-10-03 18:46:13 +00:00
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
// Show the whole thing
|
|
|
|
this.Show();
|
|
|
|
this.Update();
|
|
|
|
}
|
|
|
|
|
2014-12-03 09:06:05 +00:00
|
|
|
//mxd
|
|
|
|
private static void UpdateTexturePanel(GroupBox panel, Label texturename, List<Label> proplabels, Panel image, int sizeref, bool extendedinfoshown)
|
|
|
|
{
|
|
|
|
//Reposition texture name label?
|
|
|
|
if(texturename.Width < image.Width + 2)
|
|
|
|
texturename.Location = new Point(image.Location.X + (image.Width - texturename.Width) / 2, texturename.Location.Y);
|
|
|
|
else
|
|
|
|
texturename.Location = new Point(image.Location.X - 1, texturename.Location.Y);
|
|
|
|
|
|
|
|
// Resize panel
|
|
|
|
if(!extendedinfoshown)
|
|
|
|
panel.Width = Math.Max(texturename.Right + image.Location.X - 1, sizeref);
|
|
|
|
else
|
|
|
|
panel.Width = Math.Max(texturename.Right, GetMaxRight(proplabels)) + image.Location.X;
|
|
|
|
}
|
|
|
|
|
|
|
|
//mxd
|
|
|
|
private static int GetMaxRight(IEnumerable<Label> labels)
|
|
|
|
{
|
|
|
|
int max = 0;
|
|
|
|
foreach (Label label in labels) if (label.Right > max) max = label.Right;
|
|
|
|
return max;
|
|
|
|
}
|
|
|
|
|
|
|
|
//mxd
|
|
|
|
private static void DisplayTextureSize(Label label, ImageData texture)
|
2014-11-25 11:52:01 +00:00
|
|
|
{
|
|
|
|
if(General.Settings.ShowTextureSizes && texture.ImageState == ImageLoadState.Ready
|
|
|
|
&& !string.IsNullOrEmpty(texture.Name) && !(texture is UnknownImage))
|
|
|
|
{
|
2013-06-17 13:17:53 +00:00
|
|
|
label.Visible = true;
|
Fixed, Texture previews: texture size labels were displaying incorrect size or no size at all when showing TEXTURES textures with negative scale.
Fixed, Visual mode, UDMF: when several wall parts were selected, only one could be dragged with the mouse.
Fixed, Visual mode, Auto-align textures, UDMF: TEXTURES scale is now taken into account when aligning textures.
Fixed, Visual mode, Auto-align textures (Y), UDMF: nearest height matching is now applied to non-wrapped middle backsides.
Cosmetic changes in ZDoom_ACS.cfg.
2015-01-27 11:40:25 +00:00
|
|
|
label.Text = Math.Abs(texture.ScaledWidth) + "x" + Math.Abs(texture.ScaledHeight);
|
2014-11-25 11:52:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-06-17 13:17:53 +00:00
|
|
|
label.Visible = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
// When visible changed
|
|
|
|
protected override void OnVisibleChanged(EventArgs e)
|
|
|
|
{
|
|
|
|
// Hiding panels
|
|
|
|
if(!this.Visible)
|
|
|
|
{
|
|
|
|
floortex.BackgroundImage = null;
|
|
|
|
ceilingtex.BackgroundImage = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Call base
|
|
|
|
base.OnVisibleChanged(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|