UltimateZoneBuilder/Source/Core/Controls/VertexInfoPanel.cs
MaxED 52ab917179 Visual Mode, UDMF: Change texture scale actions now try to change scale by one texture/sprite pixel at a time. Action info now also shows scaled texture/sprite size.
Info panels: float values are now formatted regardless of current CultureInfo (e.g. decimal separator is now always dot). Also, they are no longer clamped to 2 decimal places.
Updated ZDoom_ACS.cfg.
2015-03-03 09:42:54 +00:00

78 lines
1.8 KiB
C#

#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.Globalization;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Map;
#endregion
namespace CodeImp.DoomBuilder.Controls
{
internal partial class VertexInfoPanel : UserControl
{
// Constructor
public VertexInfoPanel()
{
// Initialize
InitializeComponent();
}
// This shows the info
public void ShowInfo(Vertex v)
{
// Vertex info
vertexinfo.Text = " Vertex " + v.Index + " ";
position.Text = v.Position.x.ToString(CultureInfo.InvariantCulture) + ", " + v.Position.y.ToString(CultureInfo.InvariantCulture);
//mxd. Height offsets
if(General.Map.UDMF)
{
if(!float.IsNaN(v.ZCeiling))
{
zceiling.Text = v.ZCeiling.ToString(CultureInfo.InvariantCulture);
zceiling.Enabled = true;
labelCeilingOffset.Enabled = true;
}
else
{
zceiling.Text = "--";
}
if(!float.IsNaN(v.ZFloor))
{
zfloor.Text = v.ZFloor.ToString(CultureInfo.InvariantCulture);
zfloor.Enabled = true;
labelFloorOffset.Enabled = true;
}
else
{
zfloor.Text = "--";
}
panelOffsets.Visible = true;
} else {
panelOffsets.Visible = false;
}
// Show the whole thing
this.Show();
this.Update();
}
}
}