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;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.ComponentModel;
|
|
|
|
using System.Drawing;
|
|
|
|
using System.Text;
|
|
|
|
using System.Windows.Forms;
|
|
|
|
using Microsoft.Win32;
|
|
|
|
using System.Diagnostics;
|
|
|
|
using CodeImp.DoomBuilder.Data;
|
|
|
|
using CodeImp.DoomBuilder.Map;
|
2012-11-27 23:04:49 +00:00
|
|
|
using CodeImp.DoomBuilder.GZBuilder.Tools;
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
#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
|
2009-06-05 19:03:56 +00:00
|
|
|
vertexinfo.Text = " Vertex " + v.Index + " ";
|
2009-04-19 18:07:22 +00:00
|
|
|
position.Text = v.Position.x.ToString("0.##") + ", " + v.Position.y.ToString("0.##");
|
|
|
|
|
2012-11-27 23:04:49 +00:00
|
|
|
//mxd. Height offsets
|
|
|
|
if(General.Map.UDMF) {
|
|
|
|
float zc = UDMFTools.GetFloat(v.Fields, "zceiling", 0);
|
|
|
|
float zf = UDMFTools.GetFloat(v.Fields, "zfloor", 0);
|
|
|
|
|
|
|
|
zceiling.Enabled = (zc != 0);
|
|
|
|
labelCeilingOffset.Enabled = zceiling.Enabled;
|
|
|
|
|
|
|
|
zfloor.Enabled = (zf != 0);
|
|
|
|
labelFloorOffset.Enabled = zfloor.Enabled;
|
|
|
|
|
|
|
|
zceiling.Text = zc.ToString("0.##");
|
|
|
|
zfloor.Text = zf.ToString("0.##");
|
|
|
|
|
|
|
|
panelOffsets.Visible = true;
|
|
|
|
} else {
|
|
|
|
panelOffsets.Visible = false;
|
|
|
|
}
|
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
// Show the whole thing
|
|
|
|
this.Show();
|
|
|
|
this.Update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|