UltimateZoneBuilder/Source/Plugins/BuilderModes/General/HintLabel.cs
MaxED b1df216a29 GZDoom Builder 1.07d:
Added "Test Map from current position" action (default shortcut is Ctrl-F9), which lets you play the game from cursor position, if you are in 2D-Mode, and from camera location if you are in Visual Mode.
Added "Sync camera position between 2D and 3D modes" (found in Preferences -> Interface -> Options), which automatically centers 2D-mode on camera position when you leave Visual Mode, and places camera at cursor position when you toggle from 2D-mode to Visual Mode (unless you have Visual Mode camera thing in your map).
Several improvements in Draw Rectangle and Draw Ellipse modes: added info label with current bevel amount and subdivision level; bevel amount now applied properly when shape size is smaller than it.
2012-06-07 01:06:37 +00:00

38 lines
1 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Geometry;
namespace CodeImp.DoomBuilder.BuilderModes
{
public class HintLabel : LineLengthLabel
{
private const int TEXT_CAPACITY = 32;
private const float TEXT_SCALE = 10f;
private string text = "";
public string Text {
get {
return text;
}
set {
text = value;
Update();
}
}
public HintLabel() : base() {
label.Color = General.Colors.BrightColors[new Random().Next(General.Colors.BrightColors.Length - 1)];
}
protected override void Update() {
Vector2D delta = end - start;
float length = delta.GetLength();
label.Text = text;
label.Rectangle = new RectangleF(start.x + delta.x * 0.5f, start.y + delta.y * 0.5f, 0f, 0f);
}
}
}