mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-24 04:41:10 +00:00
1b1546ae6a
Changed, cosmetic, Sector Info panel, Visual mode: info about currently highlighted surface is now shown using different color. Changed, cosmetic, Linedef Info panel, Visual mode, non-UDMF: texture offset labels for currently highlighted sidedef are now shown using different color. Changed, cosmetic, Vertex Info panel, UDMF: floor and ceiling offset labels are now grayed out when they have default values.
64 lines
1.7 KiB
C#
64 lines
1.7 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)
|
|
{
|
|
bool haveoffset = !float.IsNaN(v.ZCeiling);
|
|
zceiling.Text = (haveoffset ? v.ZCeiling.ToString(CultureInfo.InvariantCulture) : "--");
|
|
zceiling.Enabled = haveoffset;
|
|
labelzceiling.Enabled = haveoffset;
|
|
|
|
haveoffset = !float.IsNaN(v.ZFloor);
|
|
zfloor.Text = (haveoffset ? v.ZFloor.ToString(CultureInfo.InvariantCulture) : "--");
|
|
zfloor.Enabled = haveoffset;
|
|
labelzfloor.Enabled = haveoffset;
|
|
}
|
|
|
|
panelOffsets.Visible = General.Map.UDMF;
|
|
|
|
// Show the whole thing
|
|
this.Show();
|
|
this.Update();
|
|
}
|
|
}
|
|
}
|