2014-01-17 09:44:08 +00:00
|
|
|
|
using System.Drawing;
|
2012-06-07 01:06:37 +00:00
|
|
|
|
using CodeImp.DoomBuilder.Geometry;
|
|
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.BuilderModes
|
|
|
|
|
{
|
2013-09-11 09:47:53 +00:00
|
|
|
|
public class HintLabel : LineLengthLabel
|
|
|
|
|
{
|
|
|
|
|
private string text = "";
|
2014-01-17 09:44:08 +00:00
|
|
|
|
public string Text { get { return text; } set { text = value; Update(); } }
|
2012-06-07 01:06:37 +00:00
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
public HintLabel() : base(false) {
|
2014-01-16 09:32:05 +00:00
|
|
|
|
label.Color = General.Colors.InfoLine;
|
2013-09-11 09:47:53 +00:00
|
|
|
|
}
|
2012-06-07 01:06:37 +00:00
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
protected override void Update() {
|
|
|
|
|
Vector2D delta = end - start;
|
|
|
|
|
label.Text = text;
|
|
|
|
|
label.Rectangle = new RectangleF(start.x + delta.x * 0.5f, start.y + delta.y * 0.5f, 0f, 0f);
|
|
|
|
|
}
|
|
|
|
|
}
|
2012-06-07 01:06:37 +00:00
|
|
|
|
}
|